Forum Discussion
Need to get store Rank based on Store Type
Hi All,
I hope all are doing good,
I have one requirement, where I need to get store ranking based on store type. Below I have attached the POC with the required output.
For eg: If I have Store X, Y, and W under store type A I need to get the ranking of a particular store under store type A and also the same for stores under store type B.
Please help me out with this.
Thanks,
Balaraju
Hi Balaraju ,
According to your description, here's my solution.
Create two calculated colulmns.
Under A Store Rank = IF ( 'Table'[Store Type] = "A", RANKX ( FILTER ( 'Table', 'Table'[Store Type] = "A" ), 'Table'[Sales] ), 0 )Under B Store Rank = IF ( 'Table'[Store Type] = "B", RANKX ( FILTER ( 'Table', 'Table'[Store Type] = "B" ), 'Table'[Sales] ), 0 )Or you can do it in a single column.
Column = RANKX ( FILTER ( 'Table', 'Table'[Store Type] = EARLIER ( 'Table'[Store Type] ) ), 'Table'[Sales] )Get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- v-yanjiang-msft
Community Support
Hi Balaraju ,
According to your description, here's my solution.
Create two calculated colulmns.
Under A Store Rank = IF ( 'Table'[Store Type] = "A", RANKX ( FILTER ( 'Table', 'Table'[Store Type] = "A" ), 'Table'[Sales] ), 0 )Under B Store Rank = IF ( 'Table'[Store Type] = "B", RANKX ( FILTER ( 'Table', 'Table'[Store Type] = "B" ), 'Table'[Sales] ), 0 )Or you can do it in a single column.
Column = RANKX ( FILTER ( 'Table', 'Table'[Store Type] = EARLIER ( 'Table'[Store Type] ) ), 'Table'[Sales] )Get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Balaraju
Helper III
It's working thank you very much