Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Rank issue

Hello, I am trying to Rank Category Id from category table   as per Quantity sold in quantity sold table. please refer the below table-  I am using this formula-  Rankbycateory = RANKX(A...
  • Radhika2605's avatar
    5 years ago

    Hi, 

     

    Yeah I believe you should have a relationship between Category table as well as the Quanity sold table. Also, the formula looks a bit incorrect.

    Once the relationship is setup properly then try using this on.  I have separated the two measures so that it becomes more clear.

    Total Quanity = SUM(QuanitySold[Qauntity Sold]) 

    Rankbycategory - RANKX(ALLselected('Product'[CategoryID]), [Total Quantity], , DESC)

     

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

     

    Thanks

    Radhika