Forum Discussion
Osmandfernanobi
6 years agoRegular Visitor
Running sum with Period
Dear experts, I have a situation where I wanted to show the running total in a line chart for Actuals, Expected, and Variance, we are able to get the values and create the visual. But having a s...
ibarrau
Super User
6 years agoHi. I see. The idea of this is to recognize the "Stop Here" automatically. We can help you do it if you tell us more about it
Is actual in a separate table?
Is there only one table in the model?
For now I'll show an example without it. You can resolve this in two different ways. The first and most importante is to recognize automatically the "max_date" variable. Then you can just call the calculation before that date or complete with blank for the next days of that date:
Measure 1 =
VAR max_date = DATE(2009;1;1)
RETURN
CALCULATE( [SalesAmount]; InternetSales[Order Date] < max_date )
Measure 2 =
VAR max_date = DATE(2009;1;1)
RETURN
IF(
MAX(InternetSales[Order Date]) > max_date ;
BLANK();
[SalesAmount]
)
Build this measures for Budget and Variance (my sales amount should be your budget)
Hope this helps,
Regards,