Forum Discussion
sarahp
5 years agoFrequent Visitor
PowerBI Cumulative Total / Duplicate Values
Hi all, I have been struggeling with this problem for quite a while now. I’m trying to calculate a cumulative total of IssueId’s for each category. The formula I have now looks like this: ...
lbendlin
5 years agoSuper User
Add a small random number to your values to break the ties.
sarahp
5 years agoFrequent Visitor
Hi lbendlin
If i add a random number the statement and result look like this:
ISINSCOPE(IssueCategoryHierarchy[Hierarchy_L2_Text]),
Var TotalIssues2 = CALCULATE(COUNT(IssueStatus[IssueId]),ALLSELECTED(IssueStatus))
Var CurrentIssues2 = COUNT(IssueStatus[IssueId])
Var SummarizedTable2 =
summarize(
ALLSELECTED(IssueStatus),
(IssueCategoryHierarchy[Hierarchy_L2_Text]),
"XZ", [NumberOfIssueId]
)
Var CumulativeSum2 =
Sumx(
FILTER(SummarizedTable2, [XZ] >= CurrentIssues2 ),
[XZ] )
Return
CumulativeSum2,