TOPn SOLD vs OH

shophoney

Active Member
Joined
Jun 16, 2014
Messages
281
[FONT=&quot]Hi, I’m trying to build a measure to list the TOP 10 models and what our inventory levels are for those items.[/FONT]
[FONT=&quot]I would rather use CUBIC formulas but since the list of the TOP items changes each day I am limited to a Pivot Table. I could have another pivot table and use a vlookup. But that doesn’t seem as efficient.[/FONT]
[FONT=&quot]This is my TOPN[/FONT]
[FONT=&quot]TOP 25 BRANDS UNITS SOLD:=VAR RankingContext =
VALUES ( ‘tblVendor'[VENDOR NAME])
VAR TopNumber = 25
RETURN
CALCULATE (
[SALES UNITS SOLD],
TOPN ( TopNumber, ALL( ‘tblVendor'[VENDOR NAME]),[SALES UNITS SOLD] ),
RankingContext
)[/FONT]

[FONT=&quot] [/FONT]
[FONT=&quot]This is my OH measure:[/FONT]
[FONT=&quot]ON HAND UNITS:=sum(‘INVENTORY STATUS'[OH UNITS])[/FONT]
[FONT=&quot]I would like to see how many units sold and then how many we have left.[/FONT]
[FONT=&quot] When I pull down both measures the list is hundreds of rows. Not the top 10 or 25 [/FONT]
[FONT=&quot]Thanks[/FONT]
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,214,788
Messages
6,121,580
Members
449,039
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top