Forum Discussion
abhiram342
6 years agoMicrosoft Employee
RankX function across multiple Dimension Tables
Hi All, I have two dimension tables and one fact table . I have Product Table (Dimension) , Customer Table ( Dimesnion) and Sales table (Fact). For Each Product, I would like display Top 3 Custo...
Anonymous
6 years agoNot applicable
Hi abhiram342 ,
You can use this measure
Top 3 =
SWITCH(
TRUE(),
ISINSCOPE(Customer[Name]), RANKX(ALL('Customer'[Name]),[Total Sales]),
ISINSCOPE('Item'[Brand]), RANKX(ALL('Item'[Brand]), [Total Sales])
)
Create a Visual Filter where Top3 is less than 3.
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
- abhiram3426 years agoMicrosoft Employee
Thanks Harsh ! I have replaced with actual tables and the DAX code is runnig for more than 10 mins . Can you please suggest if we have any alternatives
Thanks,
Abhiram