Forum Discussion
Measure to select rows based on dynamic conditions
- Anonymous2 years ago
Hi honkiedonkie ,
Please refer to my pbix file.
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi honkiedonkie ,
Please try to change the measure2.
Measure2 =
VAR _1 =
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Category] = SELECTEDVALUE ( 'Table'[Category] )
),
[Measure]
)
RETURN
IF ( _1 <> BLANK (), MAX ( 'Table'[Value] ), BLANK () )
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That's genius, thank you!
One more thing, if rather than 'Table'[Value] I had a measure of the value - is there a way I can still do the above?
In my actual dataset there are some values with repeated Category-Week combination and I have a measure that returns the average of those values for the rows with same combination.
Averaging Measure = CALCULATE(AVERAGE('Table'[Value]), ALLEXCEPT('Table', 'Table'[Category], 'Table[Week]))
The current way I can go about doing this is to create a calculated column rather than measure, but for a large dataset my computer does not have sufficient memory. I was wondering if there is a way I could use only measures to do this. Thank you again!