Forum Discussion
Retrieving Column Values When a Measure Reaches Its Maximum
- Anonymous1 year ago
Hi mh20221111
You can create a measure.
Diff = VAR a = SUMMARIZE ( ALLSELECTED ( table ), [Category1], [Size], [Amount1], "Max0", [Measure0] ) VAR b = MAXX ( TOPN ( 1, FILTER ( a, [Category1] IN VALUES ( table[Category1] ) ), [Max0], DESC ), [Amount1] ) RETURN SUM ( table[Amount1] ) - bBest Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi mh20221111
You can create a measure.
Diff =
VAR a =
SUMMARIZE (
ALLSELECTED ( table ),
[Category1],
[Size],
[Amount1],
"Max0", [Measure0]
)
VAR b =
MAXX (
TOPN (
1,
FILTER ( a, [Category1] IN VALUES ( table[Category1] ) ),
[Max0], DESC
),
[Amount1]
)
RETURN
SUM ( table[Amount1] ) - b
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- mh202211111 year agoHelper II
Thank you for your response.
After creating the measure based on the description you provided, I was able to display the desired values and replicate the initial chart using a table visual. However, when I applied a filter on Size, the measure returned 0. I suspect that the issue is related to the use of the ALLSELECTED function. Is there a workaround for this?- Anonymous1 year agoNot applicable
Hi mh20221111
How do you filter the size field? Can you provide some pictures of the problem you encountered?
Best Regards!
Yolo Zhu
- mh202211111 year agoHelper II
I'm attaching an image now. Could you please check it?
before filtering
Before
After
- mh202211111 year agoHelper II
I was able to implement what I wanted to do using the method you explained. Thank you for your guidance.