Forum Discussion

rod_puente's avatar
rod_puente
Helper I
1 year ago
Solved

Help with Index for DAX

¡Hi Everyone!   Pls, I need to know how I can add an index by DAX, so that I can have a cumulative sum like the following image:   I need the index for DAX, I don't need it for Power Query....
  • suparnababu8's avatar
    1 year ago

    To add an index column using DAX in Power BI, you can use several different functions depending on your specific needs. Here are a few common methods:

    Using the ROW Function

    Using the RANKX Function - Index = RANKX(ALL(Table), Table[Column], , ASC, DENSE)

     

    Pls go through this - https://learn.microsoft.com/en-us/dax/index-function-dax

     

    Using the COUNTROWS and FILTER Functions - Index = COUNTROWS(FILTER(Table, Table[Column] <= EARLIER(Table[Column])))