Forum Discussion
Help calculating cumulative data
- 10 years ago
Thanks for the help everyone, unfortunately I didnt get the right answer from your responses. The table I am using is just an excel file I manually created so I went in there and for the end of each month using an if formula I created a one off total wagons number. This worked perfectly.
Thanks for your help though.
Hi,
Can you try this measure :
Cumulative Measure = SUMX( FILTER( SUMMARIZE( YourTable , [Month] , "Total wagons" , AVERAGE( [Forestry total wagons] ) , "Max Date" , MAX( [Date Key] ) , [Max Date]<=MAX([Date Key]) ) , [Total wagons] )
- konstantinos10 years agoMemorable Member
Hi also this works..I think Rémi must be faster
cummulative := CALCULATE ( SUMX ( VALUES ( Table1[Months] ); AVERAGEX ( Table1; Table1[Forestry total wagons] ) ); FILTER ( ALL ( Table1 ); Table1[Date key] <= MAX ( Table1[Date key] ) ) )Edit : You don't need the AVERAGEX iteration..simple Average
cummulative := CALCULATE ( SUMX ( VALUES ( Table1[Months] ); AVERAGE ( Table1[Forestry total wagons] ) ); FILTER ( ALL ( Table1 ); Table1[Date key] <= MAX ( Table1[Date key] ) ) )- GilesWalker10 years agoSkilled Sharer
Thanks for the help everyone, unfortunately I didnt get the right answer from your responses. The table I am using is just an excel file I manually created so I went in there and for the end of each month using an if formula I created a one off total wagons number. This worked perfectly.
Thanks for your help though.