Forum Discussion
fosterXO
3 years agoFrequent Visitor
Measure case based on other column text values
Hi, I have a big model in PowerBI where there are many different aggregation and grouping based on columns being displayed or not on the final table. Simplifying: I need to do a conditional stat...
- Anonymous3 years ago
Hi fosterXO ,
Please have a try.
Create a measure.
Measure = SWITCH ( TRUE (), MAX ( 'Table'[Column1] ) = "A1", SUMX ( FILTER ( ALL ( 'Table' ), 'Table'[Column1] = SELECTEDVALUE ( 'Table'[Column1] ) ), 'Table'[Column2] ), MAX ( 'Table'[Column1] ) = "A2", MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Column1] = SELECTEDVALUE ( 'Table'[Column1] ) ), 'Table'[Column2] ), BLANK () )If I have misunderstood your meaing, please provide more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
3 years agoNot applicable
Hi fosterXO ,
Please have a try.
Create a measure.
Measure =
SWITCH (
TRUE (),
MAX ( 'Table'[Column1] ) = "A1",
SUMX (
FILTER (
ALL ( 'Table' ),
'Table'[Column1] = SELECTEDVALUE ( 'Table'[Column1] )
),
'Table'[Column2]
),
MAX ( 'Table'[Column1] ) = "A2",
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Column1] = SELECTEDVALUE ( 'Table'[Column1] )
),
'Table'[Column2]
),
BLANK ()
)
If I have misunderstood your meaing, please provide more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.