cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Welsh_Will
Frequent Visitor

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 highlight any records where the billing entity does not match this format? I don't have access to the Edit Queries in this dataset, so would have to be a column.

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
luapdoniv Resolver II
Resolver II

Re: Format Check

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
 
Screenshot_5.jpg

View solution in original post

6 REPLIES 6
luapdoniv Resolver II
Resolver II

Re: Format Check

I would suggest, create a new view and filter out for that dimension to "Not contain" "."

luapdoniv Resolver II
Resolver II

Re: Format Check

If you are expecting entire formats to change, could you share a sample source data, so that I can work it out and see. Thanks.

Welsh_Will
Frequent Visitor

Re: Format Check

It varies quite a bit as I believe the field is free text, so the first three are correct and then the rest are examples of errors:

 

BDA.4856

GHS.2586

CPT.1854

GHE.4586_NAME_OF_COMPANY_UNDERSCORES

1238

LPT.8675 NAME OF COMPANY NO UNDERSCORES

luapdoniv Resolver II
Resolver II

Re: Format Check

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
 
Screenshot_5.jpg

View solution in original post

Welsh_Will
Frequent Visitor

Re: Format Check

Thank you!

luapdoniv Resolver II
Resolver II

Re: Format Check

You are welcome and hope your problem got resolved. Let me know if you need any further help. Cheers!

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors