Forum Discussion
Running total not giving correct answer
- 1 year ago
hello Devon-Yeager
if i am not misunderstood the discussion, the problem is how to calculate running sum from a measure.
next the [Available Hours] is a form of measure from another calculation.
please check if this accomodate your expected result (please ignore the index as it works only as sorting in table visual).
i think the [5. Running Sum] above should be matched to your correct hours.
create a new measure for calculating Running Sum
5. Running Sum =
SUMX(
FILTER(
ALL('Table'),
'Table'[Date]<=MAX('Table'[Date])
),
[Available Hours]
)i made the [Available Hours] above as a measure because your original data has [Available Hours] as measure.i assumed you have expected result for calculations before [Available Hours].Hope this will help.Thank you.
Follow the instructions mentioned in my previuos mail and revise the measure to
Measure = calculate([4. Available hours],datesbetween(calendar[date],eomonth(today(),-1)+1,max(calendar[date])))
Hope this helps.
Thank you for the additional measure to try. It's still giving me the same answer.
I really think the issue starts at the What If Employee Count measure ( = average('3 - D&A Employees by month V2'[EmployeeCount]) + SELECTEDVALUE('9 - What If Add FTE'[Additional FTE])).
I think the "average" in the measure is causing unexpected results in the downstream measures that use it.
I think I need to add something to the What If Employee Count measure but I'm not sure what. If you have any advice on that, I'd surely appreciate it.
Thanks!
- Irwan1 year agoSuper User
hello Devon-Yeager
if i am not misunderstood the discussion, the problem is how to calculate running sum from a measure.
next the [Available Hours] is a form of measure from another calculation.
please check if this accomodate your expected result (please ignore the index as it works only as sorting in table visual).
i think the [5. Running Sum] above should be matched to your correct hours.
create a new measure for calculating Running Sum
5. Running Sum =
SUMX(
FILTER(
ALL('Table'),
'Table'[Date]<=MAX('Table'[Date])
),
[Available Hours]
)i made the [Available Hours] above as a measure because your original data has [Available Hours] as measure.i assumed you have expected result for calculations before [Available Hours].Hope this will help.Thank you.- Devon-Yeager1 year agoFrequent Visitor
Thank you so much! This does work! I really appreciate the help!
- Irwan1 year agoSuper User
- Ashish_Mathur1 year agoSuper User
You are welcome. Without data to work with and the expected result, i cannot help.
- Devon-Yeager1 year agoFrequent Visitor
I included the expected result in the original post.
I have a pbix I can share but I'm not sure how to attach it to this post. If you know how, please let me know.
- Ashish_Mathur1 year agoSuper User
I do not want to see the expected result of the running total - the formula which i shared with you previously will defenitely work. I want to see the expected result of the What-If employee count measure - the one which you think is failing.