Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 ??
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
79 | |
74 | |
56 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |