Forum Discussion

Jyaul1122's avatar
Jyaul1122
Icon for Helper III rankHelper III
1 year ago
Solved

Rank 1,2 , 1,2,3

Hi, I have a table and need to find like Rank(Required Column). 

I need to get DAX column like Rank for each Project and Order  via Date . For example Project P1 have order A and B and their Date so that for Order A result will be like 1  and 2 and also for B will be 1 and 2 as show below:

 

for P2:

 

For P3 there are two order but repeat three times so that output will be 

 

 

How can achieve using DAX Column

Row data: 

ProjectOrderDate
P1A9/14/2025
P1A9/15/2025
P1B9/16/2025
P1B9/17/2025
P2C5/7/2025
P2D5/7/2025
P2C5/9/2025
P3G7/8/2024
P3H7/9/2024
P3H7/10/2024
P3G7/5/2024
P3H7/6/2024
P3G7/7/2024

 

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Jyaul1122  ,
    Thanks for reaching out to the Microsoft fabric community forum.

    I have used the DAX code provided by johnt75  to create the required rank order for your data

    Here is the generated output:

     



    Attaching the .pbix file for reference

    I hope this information helps. Please do let us know if you have any further queries.
    Thank you

6 Replies

  • You can create a calculated column like

    Rank = RANK(
        ALL( 'Table'[Project], 'Table'[Order], 'Table'[Date] ),
        ORDERBY( 'Table'[Date], ASC ),
        PARTITIONBY( 'Table'[Project], 'Table'[Order] )
    )
  • Gabry's avatar
    Gabry
    Icon for Super User rankSuper User

    Heyyy,

    this is your column

     

    rank column = RANK(DENSE,,ORDERBY('Table'[Date]),,PARTITIONBY('Table'[Project], 'Table'[Order] ))
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Jyaul1122  ,
    Thanks for reaching out to the Microsoft fabric community forum.

    I have used the DAX code provided by johnt75  to create the required rank order for your data

    Here is the generated output:

     



    Attaching the .pbix file for reference

    I hope this information helps. Please do let us know if you have any further queries.
    Thank you

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Jyaul1122 ,

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.


    Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Jyaul1122 

    May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


    Thank you

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Jyaul1122 

    As we haven’t heard back from you, we wanted to kindly follow up to check if the suggestions  provided by the community members for the issue worked. Please feel free to contact us if you have any further questions.

     

    Thanks and regards