Forum Discussion
gauravnarchal
5 years agoPost Prodigy
Cell Validation
Dear All I want to create a measure to find if any cell value is having more than 1 character (A-Z), then it should return that as an error. Digits are also not accepted as a value and should...
- 5 years ago
Hi gauravnarchal ,
Try the following measure:
Measure = SWITCH ( TRUE (); ISERROR ( MOD ( SELECTEDVALUE ( 'Table'[Indicator] ); 2 ) ) = FALSE; "ERROR"; LEN ( SELECTEDVALUE ( 'Table'[Indicator] ) ) > 1; "ERROR"; "OK" ) - 5 years ago
Hi gauravnarchal ,
Try the following code:
Measure = SWITCH ( TRUE (); ISERROR ( MOD ( SELECTEDVALUE ( 'Table'[Indicator] ); 2 ) ) = FALSE; "ERROR"; SELECTEDVALUE ( 'Table'[Indicator] ) = BLANK(); "ERROR"; LEN ( SELECTEDVALUE ( 'Table'[Indicator] ) ) > 1; "ERROR"; "OK" )
amitchandak
5 years agoSuper User
gauravnarchal , refer if this solution from the past can help
https://community.powerbi.com/t5/Desktop/Testing-if-a-string-ONLY-contains-letters/td-p/460989