Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Above
Above is a screendump of the data in my table. I am trying to create an running total or Cumulative Sum. For each chart I will pick one or more from the [OkoType] and in the chart show month ([Md]) on x-axis and [Amount] on y-Axis and as Legend I use the [Version] coloumn.
No matter how I slice it will only give me the amount for each month and not the running total/Cumulative. I have tried something like this:
Cumulative Quantity =
CALCULATE (
SUM ( AgressoAcc[Total] );
FILTER (
ALL ( AgressoAcc[Md] );
AgressoAcc[Md] <= MAX ( AgressoAcc[Md] )
)
)But no matter it helps. What am I doing wrong?
Solved! Go to Solution.
Try this
1. Firstly create a calendar table in the model and coonect the datekey of calendar table and datekey of transaction table.
Follow thos link to create a calendar table.
http://community.powerbi.com/t5/Desktop/How-do-i-create-a-date-table/m-p/23896/highlight/true#M7605
2. Create a column Year in the calendar table as Year = Year(Calendar[Date])
3. Now create the measure as
Cumulativ = CALCULATE (
sum(AgreesoAcc[Total]),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Year] = MAX ( 'Calendar'[Year] ) &&
'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
)
)
If this works please accpet this as solution and also give KUDOS.
CheenuSIng
Try this
1. Firstly create a calendar table in the model and coonect the datekey of calendar table and datekey of transaction table.
Follow thos link to create a calendar table.
http://community.powerbi.com/t5/Desktop/How-do-i-create-a-date-table/m-p/23896/highlight/true#M7605
2. Create a column Year in the calendar table as Year = Year(Calendar[Date])
3. Now create the measure as
Cumulativ = CALCULATE (
sum(AgreesoAcc[Total]),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Year] = MAX ( 'Calendar'[Year] ) &&
'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
)
)
If this works please accpet this as solution and also give KUDOS.
CheenuSIng
Change ALL ( AggressoAcc [Md] ) to just ALL ( AggressoAcc )
If I create a matrix with columns as Month and Rows as Version and sum on Amount. Creates a measure with the corrections You suggested I get the same values for sum(Amount) and Cumulative Total. So if january sum(Amount) = 6 and february sum(Amount) = 7 my Cumulative do not give me January 6 and February (6+7) = 13 instead it is 7 ??
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 122 | |
| 110 | |
| 83 | |
| 69 | |
| 68 |