Forum Discussion
Running total until Today
- 8 years ago
I see, yes. Sorry about that. I've just tested the following measure and it will return the cumulative value and display it only on the current month (and year):
Running total upto and including Today in current month (and year) = VAR RunningTotal = CALCULATE(sum('Liquidità'[Liquidità]); FILTER(ALL('Calendar'); 'Calendar'[Date] <= TODAY()) ) RETURN IF(MAX('Calendar'[year]) = YEAR(TODAY()) && MAX('Calendar'[month] ) = MONTH(TODAY()); RunningTotal ; BLANK())
I hope that works. Sorry about the mistake.Regards,
Paul.
Hi mauroanelli,
I guess you need to omit the ".[Date]" part in the formula that could make the measure ignore the context from the source table. Please try out this formula.
rt Liquidità =
CALCULATE (
SUM ( 'Liquidità'[Liquidità] );
FILTER (
( ALL ( 'Calendar'[Data] ) );
'Calendar'[Data] <= MAX ( 'Calendar'[Data] )
)
)
Best Regards,
Dale
thanks, the formula works fine itself.
the problem is that i need that measure to sum with other in the same matrix.
as it is i get the right value but for all the data (months). i need to have the value for all data until today and not further.
- v-jiascu-msft8 years agoMicrosoft Employee
Hi mauroanelli,
Did you try PaulDBrown's solution? Maybe you can share the pbix file with us. You can delete the confidential parts first.
Best Regards,
Dale
- mauroanelli8 years agoHelper I
sure, works fine as yours but same problem.
show the correct value but for all the dates, i just need to show it in current month
- PaulDBrown8 years agoCommunity Champion
If you only want the values to be visible in the current month (and year), try:
Running total upto and including Today in current month (and year) = VAR RunningTotal = CALCULATE(sum('Liquidità'[Liquidità]); FILTER(ALL('Calendar'); 'Calendar'[Date] <= TODAY()) ) RETURN CALCULATE (RunningTotal; FILTER ('Calendar'; 'Calendar'[Month] = MONTH(TODAY())
&&
'Calendar'[Year] = YEAR(TODAY())
)
)