Forum Discussion
rod_puente
1 year agoHelper I
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....
- 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])))
Ashish_Mathur
1 year agoSuper User
Hi,
If you have a Date column in your Fact table, then the problem is easy to solve. If not, then in what order should the data be arranged to calculate the cumulative total? Should it be in ascending order of Cleints?