Forum Discussion
gbarr12345
2 years agoPost Prodigy
Bottom 5 Sales by Market Measure
Hi there, I'm looking to create a measure to get the bottom 5 sales by Market without needing the use of slicers/ filters. Is it possible to do this with a measure as I can do the top 5 but I...
- 2 years ago
Hi gbarr12345
You can use a measure :Bottom_5 =VarRank_market = RANKX(ALLSELECTED('Dimension_Market Table'[Market]),[total_sales],,ASC,Dense)RETURNIF(Rank_market>0 &&Rank_market<6,[total_sales],BLANK())pbix is attachedIf this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
gbarr12345
2 years agoPost Prodigy
Apologies, I missed this message.
Please find the PBIX file with the dax attempt here - https://drive.google.com/file/d/1euNJ7rP3m1LALVXtiR8KdFQH9TY9v_HO/view?usp=drive_link
Bottom 5 Sales by Market =
VAR MarketRank = RANKX( ALL( 'Sales Table'[Market]) , [Total Sales] , , ASC)
RETURN
CALCULATE(
[Total Sales],
FILTER(
'Sales Table',
MarketRank <= 5
)
)
Ashish_Mathur
2 years agoSuper User
Hi,
I just dragged Market to the visual and your measure seems to work
- gbarr123452 years agoPost Prodigy
That worked in the end, apologies my system was just acting up.
Thanks a million for your help Ashish as per usual!!
- Ashish_Mathur2 years agoSuper User
You are welcome.