Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Find UPPER except these specific values

I am using this to find improperly formatted name suffixes that are all capitalized, but I am wondering if with additional code I can filter out certain suffixes that are properly in all caps. Some examples are in the image below.

 

SF = IF (
[Suffix] = BLANK (),
BLANK (),
IF(
EXACT(UPPER('132330'[Suffix]), '132330'[Suffix])
, "yes", "no"))

 

 

Snag_3ab9c0.png

5 REPLIES 5
bhelou
Responsive Resident
Responsive Resident

hi , try to work with switch : 

SF = SWITCH(
TRUE(),
[Suffix] = BLANK(), BLANK(),
EXACT(UPPER('132330'[Suffix]), '132330'[Suffix]) && NOT(CONTAINS("JR,SR,III,IV,V", UPPER('132330'[Suffix]))), "yes",
"no"
)

Anonymous
Not applicable

@bhelou I get this message: Too few arguments were passed to the CONTAINS function. The minimum argument count for the function is 3.

Anonymous
Not applicable

@bhelou I tried changing the "AND" to & and now I get this error message.

 

Snag_ced4da.png

Anonymous
Not applicable

@bhelou I get this message.
The syntax for 'AND' is incorrect. (DAX(IF ( [Suffix] = BLANK (), BLANK (), IF( EXACT(UPPER('132330'[Suffix]), '132330'[Suffix]) AND NOT(EXACT('132330'[Suffix], "JR.")), "yes", "no" ) )))

 

I'm also wondering how I would add multiple results to filter out in addition to the "JR." you have in the sample.

 

bhelou
Responsive Resident
Responsive Resident

Hi , try this : 

SF = IF (
[Suffix] = BLANK (),
BLANK (),
IF(
EXACT(UPPER('132330'[Suffix]), '132330'[Suffix])
AND NOT(EXACT('132330'[Suffix], "JR.")),
"yes", "no"
)
)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.