Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Problem calculation Rolling total for Non-date fields

Hello,

I have issue in calculating the rolling Sum total for "Total Value Change" coulmn.

 

 



I need dynamic cummulative total. The measure which I am using is:

TEST For Running Total =
VAR CurrentValueChange = [Total Value Change]
VAR MaterialsWithSales = ADDCOLUMNS ( ALLSELECTED ( 'CURRENT KEKO'[Material Number (Trimmed)] ),"@Values", [Total Value Change])
VAR MaterialsWithHigherSales = FILTER ( MaterialsWithSales, [@Values] >= CurrentValueChange )
VAR Ranking = COUNTROWS (MaterialsWithHigherSales)
VAR FinalResult = SUMX ( MaterialsWithHigherSales, [@Values] )
Return
FinalResult

  
-> This DAX is not working and It is difficult to find the Rolling total. This measure Works if we use it only for Card. 
Example of card: 

This matches the total but when I drag this formula to the Table, it throws error. 


Thanks!

3 Replies