Forum Discussion
Help with Running Total (Cumulative Sum) using a Measure to sort
Hi,
I'm struggling with a running total measure. All the examples I can find use the "sorting" attribute of a regular column date field of some sort. However, I need to use a ranking which is a measure. This is how it would look in theory, but I can't seem to use PrioritizationScore because it's a measure.
Thanks in advance!
Running Total MEASURE =
CALCULATE (
SUM ( 'Project'[ProjectEstimate] ),
FILTER (
ALL ( 'Project' ),
[PrioritizationScore] <= MAX ([PrioritizationScore])))
4 Replies
- parry2kSuper User
facilitydax not sure if you can use MAX with your existing measure? Are you sure you added PrioritizationScore as measure not column?
- facilitydaxFrequent Visitor
That's what I'm getting at is that I need to be able to use the PrioritizationScore measure as my way of sorting for the running total. I was showing a theoretical measure. Even if I use a SUMX on it, I get a strange result
Agg Test = CALCULATE ( SUM ( 'Project'[ProjectEstimate] ), FILTER ( ALL ( 'Project' ), [PrioritizationScore] <= SUMX('Project', [PrioritizationScore])))This will give me these results:
which doesn't do a running total, but rather just spits the cost per line back out.
- facilitydaxFrequent Visitor
parry2k , forgot to tag you in my last reply.