Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I wish to perform a SUM operation based on a specific scenario. I'd tried TOPN but I belive this could be the wrong approach. Also, the 'Comments' column for each row of the serial number will always be unique.
Below is the sample table :
I want an output like this :
Would appreciate any guidance around this, thanks.
Solved! Go to Solution.
Hi @bmk ,
Please try
Output =
CALCULATE (
SUM ( 'Table'[Cat1] ),
FILTER ( ALLSELECTED ( 'Table' ), [Comments] = MAX ( 'Table'[Comments] ) )
)
+ CALCULATE (
SUM ( 'Table'[Cat2] ),
FILTER ( ALLSELECTED ( 'Table' ), [Comments] = MAX ( 'Table'[Comments] ) )
)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @bmk ,
Please try
Output =
CALCULATE (
SUM ( 'Table'[Cat1] ),
FILTER ( ALLSELECTED ( 'Table' ), [Comments] = MAX ( 'Table'[Comments] ) )
)
+ CALCULATE (
SUM ( 'Table'[Cat2] ),
FILTER ( ALLSELECTED ( 'Table' ), [Comments] = MAX ( 'Table'[Comments] ) )
)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
From what you want your output to be, it seems like you just want a maximum for each serial number. Is this correct? You can create a measure = max(table[output]) and get what you're looking for I believe
This should work I believe. Would ALLEXCEPT be required at all?
That would depend on what context filters you are using and if you want them to affect the final value!
User | Count |
---|---|
65 | |
46 | |
20 | |
18 | |
15 |
User | Count |
---|---|
120 | |
41 | |
40 | |
28 | |
23 |