Forum Discussion
KH_Mike
4 years agoHelper III
Match Serval Text in Measure
Hi All, Right now, I am using contains function to match the text in "Measure" and show it in "Table". May I know if there is any easy way to acheive the same result ? If possible, is it able to ...
- Anonymous4 years ago
Hi KH_Mike ,
Try
Measure= SWITCH ( MAX ( 'Data'[Country] ), "USA", "AMR", "CANADA", "AMR", MAX ( 'Data'[Country] ) )or
Measure= IF ( MAX ( 'Data'[Country] ) = "USA" || MAX ( 'Data'[Country] ) = "CANADA", "AMR", MAX ( 'Data'[Country] ) )The MAX function is equivalent to getting the value of the current row, and the MIN function can also achieve the same effect.
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.
Anonymous
4 years agoNot applicable
Hi KH_Mike ,
Try
Measure=
SWITCH (
MAX ( 'Data'[Country] ),
"USA", "AMR",
"CANADA", "AMR",
MAX ( 'Data'[Country] )
)
or
Measure=
IF (
MAX ( 'Data'[Country] ) = "USA"
|| MAX ( 'Data'[Country] ) = "CANADA",
"AMR",
MAX ( 'Data'[Country] )
)
The MAX function is equivalent to getting the value of the current row, and the MIN function can also achieve the same effect.
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.
KH_Mike
4 years agoHelper III
Hi Anonymous,
That exactly what I need. Thank you.