Forum Discussion
Ranking by Multiple Criteria
- Anonymous6 years ago
Hi Anonymous ,
You are ranking the Stores according to Sales which belong to the Same Tier for a particular Date.
Column =RANKX(FILTER('Table1','Table1'[Date] = EARLIER('Table1'[Date]) && Table1[Store Tier] = EARLIER(Table1[Store Tier])),Table1[Sales])Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
10 Replies
- amitchandak
Super User
Anonymous , your measure should have the filters and then create rank on that measure.
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415- AnonymousNot applicable
Respected Amit,
Is there any way to rank the data using sales but date wise and tier wise only ??
- AnonymousNot applicable
This is what i am trying to achieve
Countifs(Date Range,Date,Store Tier Range, Store Tier,Sales Range,">"&SalesValue)+1
=COUNTIFS($A$2:$A$1048573,$A104,$B$2:$B$1048573,$B104,$J$2:$J$1048573,">"&$J104)+1
Using this formula in excel and is giving accurate answer, can include region & area as well
Date Store Tier Sales Ranks 09/06/2020 GOLD 100 5 09/06/2020 DIAMOND 200 4 09/06/2020 BRONZE 300 3 09/06/2020 SILVER 400 2 09/06/2020 PLATINIUM 500 1 10/06/2020 GOLD 100 5 10/06/2020 DIAMOND 200 4 10/06/2020 BRONZE 300 3 10/06/2020 SILVER 400 2 10/06/2020 PLATINIUM 500 1 Is there any solution that i can get
1- Date wise Tier wise Sales wise Rank
2- Date wise Region wise Sales wise Rank
3- Date wise Area wise Sales wise Rank
I have gone through so many solutions but none of them included date and when i apply that it ranked perfectly but not according to individual date.
- AnonymousNot applicable
Hi Anonymous ,
Create a measure.
Datewise Sales =RANKX(FILTER(ALLSELECTED('Table'),'Table'[Date] = MAX('Table'[Date])),CALCULATE(SUM('Table'[Sales])))Regards,
Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)