Forum Discussion
Anonymous
3 years agoNot applicable
Problem with summing in running total
Hi All, I have a problem with summing in running total - values do not add up. I want to calculate the running total for the PCS_Claimed column for the Complaints_reason_PAC category. I tried such measures:
ThirdPcs =
CALCULATE(
[PcsSum],
FILTER(
ALLSELECTED('PACbi QualityComplaints'[Complaints_reason_PAC]),
ISONORAFTER('PACbi QualityComplaints'[Complaints_reason_PAC], MAX('PACbi QualityComplaints'[Complaints_reason_PAC]), desc)
)
)
SecondPCS =
CALCULATE(
[PcsSum],
FILTER(ALLSELECTED('PACbi QualityComplaints'[PCS_Claimed]),'PACbi QualityComplaints'[PCS_Claimed] <= Max('PACbi QualityComplaints'[PCS_Claimed]) )
)
**bleep** Pcs = CALCULATE(sum('PACbi QualityComplaints'[PCS_Claimed]),FILTER(ALL('PACbi QualityComplaints'[PCS_Claimed]),'PACbi QualityComplaints'[PCS_Claimed] >= MAX('PACbi QualityComplaints'[PCS_Claimed])),VALUES('PACbi QualityComplaints'[Complaints_reason_PAC]))
Neither of these measures adds value, but displays the same as PCS_Claimed, I have the same in excel but there it works
Do you know where the mistake is?
1 Reply
- Greg_DecklerCommunity Champion
Anonymous Not entirely certain but this looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907