Forum Discussion

Haidannx's avatar
Haidannx
Helper I
6 years ago
Solved

Ranking by category

Hello guys,

 

I`ve a data set like below:

 

Request idPrice
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.

  • Tahreem24's avatar
    Tahreem24
    6 years ago

    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!

     

  • Anonymous's avatar
    Anonymous
    6 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