Forum Discussion

sabd80's avatar
sabd80
Icon for Helper IV rankHelper IV
2 years ago
Solved

DAX flag the first occurrence

Hi,
I have below data, I would like to create a calculated column (Rank) to flag only one record with 1 for a supplier that have multiple lines with the same date.
for example, supplier 12345 has 9 records, I want to flag only one record with 1.
Can you please help.


  • Hi sabd80 

    You can achieve this by creating an index column, Hope the below pattern fullfuils your requirement

    P.S. calculated columns can degrade your report performance. 

     

    If my answer fulfills your requirement then please mark my post as solution.

     

    Thanks

    Tharun

6 Replies

    • sabd80's avatar
      sabd80
      Icon for Helper IV rankHelper IV

      this one is not working, it return 1 for all the 9 records.

    • sabd80's avatar
      sabd80
      Icon for Helper IV rankHelper IV

      Ahmedx , Thanks for your solution.
      I need the other records, so I can't remove them, plus I have a huge data all these transformation will affect the performance of the report.

      • Ahmedx's avatar
        Ahmedx
        Icon for Super User rankSuper User

        to do this remove the last two steps
        and then you will be able to work with the data and filter it using DAX

  • Hi sabd80 

    You can achieve this by creating an index column, Hope the below pattern fullfuils your requirement

    P.S. calculated columns can degrade your report performance. 

     

    If my answer fulfills your requirement then please mark my post as solution.

     

    Thanks

    Tharun