Forum Discussion
gauravnarchal
2 years agoPost Prodigy
Validate - Measure
Hello - How can I create a measure to validate the values in all columns? If the Type is 000123 - the length of the description column value is 16 and the first 4 numbers start with 1111 and end ...
- 2 years ago
pls try this
Anonymous
2 years agoNot applicable
Hi gauravnarchal ,
I have created a simple sample, please refer to it to see if it helps you.
Create a measure.
Measure =
VAR _left =
LEFT ( MAX ( 'Table'[Number (Description] ), 4 )
VAR _right =
RIGHT ( MAX ( 'Table'[Number (Description] ), 4 )
RETURN
IF (
MAX ( 'Table'[Type (Text Column)] ) = "000123"
&& _left = "1111"
&& _right = "2222",
"Valid",
"InValid"
)
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.