Forum Discussion
Line chart issue with running totals
Hello,
I created this Power BI chart:
Almost right, but one of the numbers (36,994) is incorrect. Desired output (from Tableau):
I understand what is happening: bottom line ("Actuals") is a running sum. Dotted line is "Initial budget". Red line should be the difference between the two but it does not seem to consider "Actuals" as a running total. Instead 36,992 should be 38,746-3,307=35,439
I cannot post the file as it containss confidential information, unless I create some dummy data.
But maybe somebody can help just looking at the measures below?
Hi,
You have written available budget as a calculated column formula. Write that as a measure instead. This is the result you will see
7 Replies
- Ashish_Mathur
Super User
Hi,
You should ideally have a Calendar Table with calculated columns for Year, Month name and Month number. Sort the Month name by the Month number. Create a relationship from the Date column of the Overhead_New table to the Date column of the Calendar Table. To your visual, drag Year and Month Name from the Calendar Table. Write these measures
Initial Budget = sum([Initial Budget calc])
Actuals (hours) = calculate(sum([Actuals calc]),datesytd(calendar[date],"31/12"))
Available Budget = [Initial Budget]-[Actuals (hours)]
Hope this helps.
- AnonymousNot applicable
Thank you Asish for your help. I did as you suggested but no luck:
- Ashish_Mathur
Super User
I cannot help without seeing your file.
- AnonymousNot applicable
Cannot find any upload option.
- AnonymousNot applicable
Hi Ashish,
I uploaded the file on OneDrive:
Desired result (screenshot from Tableau):
The green line must be the difference between red and blue
- Ashish_Mathur
Super User
Hi,
You have written available budget as a calculated column formula. Write that as a measure instead. This is the result you will see