Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Format Check

Hello all,   I'm trying to create a check to ensure that users are entering the Billing Entity in the correct format, which is always 3 letters, dot, 4 numbers; ie BDA.5468   Is therea way to hig...
  • luapdoniv's avatar
    luapdoniv
    6 years ago

    Create 2 measures:

    1. to see if the "." is in place: 

    dotplace = find(".",'Table'[Column1],1,0)
    2. to see if the length exceeds 4 after dot
    PlacesAfterDot = if(len(mid('Table'[Column1],5,50))>4 || len(mid('Table'[Column1],5,50))<4,1,0)
    then apply conditional formatting on the column to get the desired output.
    You may need to write additional logics to suit your other possible combination requirements