Forum Discussion
Ranking by category
Hello guys,
I`ve a data set like below:
| Request id | Price |
| 456 | $1568 |
| 456 | $1569 |
| 456 | $1570 |
| 456 | $1571 |
| 456 | $1572 |
| 456 | $1573 |
| 456 | $1574 |
| 456 | $1575 |
| 456 | $1576 |
| 456 | $1577 |
| 456 | $1578 |
| 457 | $1579 |
| 457 | $1580 |
| 457 | $1581 |
| 457 | $1582 |
| 457 | $1583 |
| 457 | $1584 |
| 457 | $1585 |
| 457 | $1586 |
| 345 | $1587 |
| 345 | $1588 |
| 345 | $1589 |
| 345 | $1590 |
| 345 | $1591 |
| 345 | $1592 |
| 345 | $1593 |
| 345 | $1594 |
Now i`d like to CREATE a new COLUMN to show me In the same request ID, what are the rank of each Price?
Thanks in advance.
Haidannx ,
Create Measure like below:
Measure = RANKX(ALL('Table'), CALCULATE(sum('Table'[Price])))Attaching Screen shot for your reference:Please don't forget to hit THUMBS UP and Accept this as a solution if it helps you!
- Anonymous6 years ago
Haidannx
Use the rankx function to create the column.Rank Column = RANKX(FILTER('Table','Table'[Request id]=EARLIER('Table'[Request id])),'Table'[Price],,DESC,Dense)Paul Zheng
7 Replies
- AnonymousNot applicable
Haidannx
Use the rankx function to create the column.Rank Column = RANKX(FILTER('Table','Table'[Request id]=EARLIER('Table'[Request id])),'Table'[Price],,DESC,Dense)Paul Zheng
- amitchandakSuper User
Refer
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners/ba-p/890814
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601