Forum Discussion
MitchTrott
2 years agoFrequent Visitor
Column format check
Hi all, I need a custom column to check the values of another column are of the correct format. the format being ABCD1234. If the format is anything different i'd like it to be flagged. I cannot...
- 2 years ago
Hi, I have fixed the error with an added IFERROR clause.
Check 4x4 Format =
VAR text1 = [4x4]
VAR check1 = LEN(text1) = 8
VAR check2 = EXACT(LEFT(text1, 4), UPPER(LEFT(text1, 4)))
VAR check3 = ISNUMBER(IFERROR(VALUE(RIGHT(text1, 4)), BLANK()))
RETURN IF(check1 && check2 && check3, "Correct Format", "Incorrect Format")
Thank you for your help!!
Vallirajap
2 years agoResolver III
Hii MitchTrott,
Try this for the above scenario.
Column2 = If(LEN(SELECTEDVALUE('Table'[Column1])) = 9, "TRUE", "FALSE") // Measure
Column = If(LEN('Table'[Column1]) = 9, "TRUE", "FALSE") // Column
Both return a true or false output. Instead of True or False, you can use any value to create a flag.
Did I answer your question?
Mark my post as a solution, this will help others...!
Hit the kudo also,
Thank you.
MitchTrott
2 years agoFrequent Visitor
Thanks for your solution. This is great to check the Length but it wont flag if the input is 12345678 or A1234567 etc. Thanks