Forum Discussion

JuanVR11's avatar
JuanVR11
Icon for Helper I rankHelper I
6 years ago
Solved

Add a column for cumulative counting row

Hi Friends!

I hope u can help me with this issue. I´m looking for a dax formula in a calculated column.

 

As you can see i have a table with SalesDoc / Pos / Material columns, and i want to calculate a new column that can give me an cumulative count for every Sales Doc / pos / Material combination. But this cumulative must be starting with the most recent date to the last date.

 

Also, as you can see in the example, some combination could be the same date, in that case, only keep counting.

 

Here´s an example of the table and the expected result.

 

 

Sorry for my english and i hope u can help me.

 

Thanks!

  • JuanVR11 

     

    Please try below measure

    Column = RANKX(FILTER('Table (2)','Table (2)'[material]=EARLIER('Table (2)'[material])),'Table (2)'[date],,DESC)

2 Replies

  • JuanVR11 

     

    Please try below measure

    Column = RANKX(FILTER('Table (2)','Table (2)'[material]=EARLIER('Table (2)'[material])),'Table (2)'[date],,DESC)