Forum Discussion
Running total values and value for future periods
- 2 years ago
I couldn't make it work because future dates were not included so the measures didn't know what to do. I solved it by adding a manual table with future dates, appending this new table with my FactTable, adjusting the measures and voila!!!
i guess it's not the best and tidiest way of doing it but it works so far
Hi nicoenz ,
Thanks for reaching out to us with your problem. Base on your description, it seems that you want to get the running total for the future dates. You can follow the steps to get it:
1. Create a separated date dimension table(DO NOT create any relationship with your fact table)
2. Apply the date field of date dimension table on X-axis of your line chart
3. Update the formula of measure [Running total] as below
Running total =
VAR Turro =
CALCULATE (
SUM ( 'Table'[Volume] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Fiscal year/period] = SELECTEDVALUE ( 'Date'[Date] )
),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[WorkDayPeriod] <= SELECTEDVALUE ( 'Date'[Date] )
)
)
RETURN
IF (
Turro <> 0,
Turro,
Turro
+ CALCULATE ( SUM ( 'Table'[Volume] ), REMOVEFILTERS ( 'Table'[WorkDayPeriod] ) )
)
If the above one can't help you get the expected result, please provide some raw data in your table (exclude sensitive data) with Text format, your line chart Fields settings and your expected result with special examples and screenshots. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi Rena, i tried and couldn't make it work. tried tweaking it a bit to no avail.
I will upload the file with some more explanations
thanks!!!!