Forum Discussion
Ranking based on different measures and different dimensions
Thank you for your response. I apologize for not being clearer. I would like to create it as a calculated dimension rather than a measure, and it should be placed in the first position of the metrics.
Create a Calculated Column for Ranking: Use the RANKX function to create a calculated column that ranks your items based on Sales or Sold Quantity. For example, to rank items based on Sales, you can create a calculated column like this:
SalesRank = RANKX(ALL('YourTable'), CALCULATE(SUM('YourTable'[Sales])), , DESC, DENSE)
Similarly, for Sold Quantity:
QtyRank = RANKX(ALL('YourTable'), CALCULATE(SUM('YourTable'[Sold Qty])), , DESC, DENSE)
Add the Calculated Column to Your Visual: Once you have created the calculated column, you can add it to your visual. Make sure to place it in the first position of the metrics.
Adjust Your Visual: Add the SalesRank or QtyRank calculated column along with other dimensions like Item No, Selected Week, and Selected Week -1 to your visual.
Here's an example of how you might set up your table visual:
Columns: SalesRank, Item No, Sales, Sold Qty, Image
Rows: Selected Week, Selected Week -1
By following these steps, you should be able to create a chart that ranks items based on different measures and dimensions
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!