cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
stochasticKL Frequent Visitor
Frequent Visitor

RANKX of a summary using three (3) columns / dimensions

Hi, 

I have a source table with four dimensions: Region > Country > Area > Store and a value column Sales. I want to create a measure that will rank each store inside an area depending on its sales. I tried to replicate solutions here in the community were there are only two columns. Something similar to this: 

STORE_RANKING = 
RANKX ( 
  FILTER ( 
    ALL ( 
      Table[Region],
      Table[Country],  
      Table[Area],
      Table[Store]
    ),
    Table[Store] = MAX ( Table[Store] )
  ),
  CALCULATE ( 
    SUM ( Table[Sales] )
  )
)

I think I'm missing the logic behind calling all Store Values only for a specific Region && Country && Area. The output should look similar to this: 

RegionCountryAreaStoreSalesRank
R1AXS0121
R1AXS112
R1AYS2201
R1AYS392
R1AYS453
R1AZS5301
R1AZS672
R1BXS7481
R1BXS8112
R1BYS9241
R1BYS0192
R1BYS173
R1BZS2501
R1BZS3392
R1BZS463
R2AXS5331
R2AXS6232
R2AYS7441
R2AYS8402
R2AYS913
R2AZS0361
R2AZS162
R2BXS2481
R2BXS3212
R2BYS4261
R2BYS5162
R2BYS653
R2BZS791
R2BZS872
R2BZS933

 

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
v-jayw-msft Established Member
Established Member

Re: RANKX of a summary using three (3) columns / dimensions

hi @stochasticKL ,

 

please check following steps as below:

 

1. create Measure = SUM('Table'[Sales])

2. Create Measure 2 = RANKX(ALL('Table'[Store]),[measure])

 

Result would be shown as below:

Capture.PNG

BTW, Pbix  as attached.

Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-jayw-msft Established Member
Established Member

Re: RANKX of a summary using three (3) columns / dimensions

hi @stochasticKL ,

 

please check following steps as below:

 

1. create Measure = SUM('Table'[Sales])

2. Create Measure 2 = RANKX(ALL('Table'[Store]),[measure])

 

Result would be shown as below:

Capture.PNG

BTW, Pbix  as attached.

Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,975)