Forum Discussion
gauravnarchal
4 years agoPost Prodigy
Need help with TRUE function
Hello - I want to create a measure to get the result as true or false for the below 2 conditions. If the location starts with SIE and contains locations RUI or KLT orAKL then return true else ...
- 4 years ago
Hi, gauravnarchal
You can try the following function to write measure.
Measure1 = LEFT ( MAX('Table'[Location]), 3 ) = "SIE" && ( CONTAINSSTRING ( MAX('Table'[Location]), "RUI" ) || CONTAINSSTRING ( MAX('Table'[Location]), "KLT" ) || CONTAINSSTRING ( MAX('Table'[Location]), "AKL" ) )Measure2 = LEFT ( MAX ( 'Table'[Location] ), 3 ) = "SIE" && RIGHT ( MAX ( 'Table'[Location] ), 3 ) = "SIE" && ( CONTAINSSTRING ( MAX ( 'Table'[Location] ), "RUI" ) || CONTAINSSTRING ( MAX ( 'Table'[Location] ), "KLT" ) || CONTAINSSTRING ( MAX ( 'Table'[Location] ), "AKL" ) )Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mattww
4 years agoResponsive Resident
Hi gauravnarchal, are you ok with this being in Power Query, not DAX?