Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Show top N/Rank based on multiple dimensions

Hello,    I have a table with the format below with dimensions coming from multiple tables and sales coming from the fact table. I would like to be able to filter the table based on the top N valu...
  • Ritaf1983's avatar
    2 years ago

    Hi Anonymous 
    If your model is something like :

    You can use the DAX :

    rank_ = if (ISBLANK([total_sales]),blank(),RANKX(all('Table'),[total_sales],,DESC))
    The result :

    PBIX is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly