Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Ranking by Multiple Criteria

Respected All, I am trying to rank my data in which there are following fields Date,Region, Area, Store Name, Store Tier & Sales I want to get rank against Sales but Date wise > Region Wise > Area Wise > Store Tier Wise Like which store of which tier in which region performed well.
1 ACCEPTED SOLUTION

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])
 
 
1.jpg
 
 
Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

10 REPLIES 10
Anonymous
Not 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

 

DateStore TierSalesRanks
09/06/2020GOLD1005
09/06/2020DIAMOND2004
09/06/2020BRONZE3003
09/06/2020SILVER4002
09/06/2020PLATINIUM5001
10/06/2020GOLD1005
10/06/2020DIAMOND2004
10/06/2020BRONZE3003
10/06/2020SILVER4002
10/06/2020PLATINIUM5001

 

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.

Hi @Anonymous ,

 

Create a measure.

 

Datewise Sales =
RANKX(FILTER(ALLSELECTED('Table'),'Table'[Date] = MAX('Table'[Date])),CALCULATE(SUM('Table'[Sales])))
 
1.jpg

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 
Anonymous
Not applicable

Respected Natahni,

 

I really appreciate your effort but i need column for this.

Hi @Anonymous ,

 

For a Calculated Column

 

You can use

 

Column =
RANKX(FILTER('Table1','Table1'[Date] = EARLIER('Table1'[Date])),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)

Anonymous
Not applicable

I think i wasn't able to explain my self properly, below is the exact table which em trying to create in BI. The Rank is based on Date, Store, Store Tier against Sales.  I would really appreciate if you help me out.

 

 
DateStoreStore TierSalesRanks
09/06/2020ABRONZE1002
09/06/2020BBRONZE2001
09/06/2020ADIAMOND1002
09/06/2020BDIAMOND2001
09/06/2020AGOLD1002
09/06/2020BGOLD2001
09/06/2020APLATINIUM1002
09/06/2020BPLATINIUM2001
09/06/2020ASILVER1002
09/06/2020BSILVER2001
10/06/2020ABRONZE1002
10/06/2020BBRONZE2001
10/06/2020ADIAMOND1002
10/06/2020BDIAMOND2001
10/06/2020AGOLD1002
10/06/2020BGOLD2001
10/06/2020APLATINIUM1002
10/06/2020BPLATINIUM2001
10/06/2020ASILVER1002
10/06/2020BSILVER2001

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])
 
 
1.jpg
 
 
Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Anonymous
Not applicable

Respected Harshnathani,

 

Thanks alot for providing such a quick and accurate response i'll always look forward to learn more things from you. Stay Hapy Stay Safe. Thanks Alot.

Anonymous
Not applicable

Respected Harshnathani,

 

This works but only for date wise sales Ranking, it doesn't includes Tier. 😞 

Anonymous
Not applicable

Respected Amit,

Is there any way to rank the data using sales but date wise and tier wise only ??

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.