Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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:
Cumulative Issues =
Var TotalIssues = CALCULATE(COUNT(IssueStatus[IssueId]),ALLSELECTED(IssueStatus))
Var CurrentIssues = COUNT(IssueStatus[IssueId])
Var SummarizedTable =
summarize(
ALLSELECTED(IssueStatus),
(IssueCategoryHierarchy[Hierarchy_L2_Text]),
"XZ", COUNT(IssueStatus[IssueId])
)
Var CumulativeSum =
Sumx(
FILTER(SummarizedTable, [XZ] >= CurrentIssues ),
[XZ])
Return
CumulativeSum,
Basically it adds up everything correctly, but as soon as duplicate values appear, it adds them up at once instead of adding them separately.
Any help is appreciated. Thank you!
Add a small random number to your values to break the ties.
Hi @lbendlin
If i add a random number the statement and result look like this:
A little less small? Does not need to be all positive either.
Could you please give me an example code?
Hi @sarahp ,
Would you please show us the expected output that we can help you well?
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
for example
x - 0.05 + RAND()*0.1
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
83 | |
76 | |
65 |
User | Count |
---|---|
120 | |
112 | |
94 | |
84 | |
75 |