Forum Discussion
Sum add all the previous elements to a date
Hi, imagine there is a table with two column: Date and count code. (date show italian month)
This is a table result from a graph. My query have all code in a date.
What i need is a table/graph that sum all previous code to a date; For example july 2017 (in the table "luglio 2017") will have the number of June 2017 + July 2017 (in table "giugno 2017" + "luglio 2017") so 240+668= 908.
So something like that:
giugno 2017 | 240
luglio 2017 | 908
agosto 2017 | 908+220
settembre 2017 | 908+220+248
How can i do this?
You want a running total (cummulative total).
Check the link below how to do it,
https://whatthetechisthat.wordpress.com/2017/05/30/power-bi-cumulative-totals/
If your date field in below table is a date heirarchy, then you can choose only month and year. You need to have a calendar table and establish relatship with your data table.
Running Toal Measure =
CALCULATE(
Sum(Table[Value],
FILTER(All(Dim_Date[Date]), Dim_Date[Date] <= MAX(Dim_Date[Date]
)
)
4 Replies
- anandav
Skilled Sharer
You want a running total (cummulative total).
Check the link below how to do it,
https://whatthetechisthat.wordpress.com/2017/05/30/power-bi-cumulative-totals/
If your date field in below table is a date heirarchy, then you can choose only month and year. You need to have a calendar table and establish relatship with your data table.
Running Toal Measure =
CALCULATE(
Sum(Table[Value],
FILTER(All(Dim_Date[Date]), Dim_Date[Date] <= MAX(Dim_Date[Date]
)
)
- quentin_vigne
Solution Sage
Hi AlexEners
Here what I would do :
1 - Create a new calculated colum to get your month name.
MonthName = YourTable[DataInzoFornituraMese].[Mese]
(Not sure about the spelling as i'm trying to write this formula in italian)
2 - Use this month name + Sum of Conteggio di CodidePOD in a visual.
- Quentin