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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

IsBlank return with a specific value

Hello Experts,

 

I am trying to return null/blank fields with a specific variable. for example.

 

I have a calculated field with multiple "containstring" formula to group a specific category. 

CONTAINSSTRING(table name, "hospi"), "Hospitality"
 
I would like to return unknown category  with a variable called "Unknown" in same column. I tried isBlank function, But my calculated column name is not appearing under inBlank function
 
Would be great help if you could assist me with this.
 
thanks
 
if
2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , not very clear. Try a new column like

Switch(true(),
isblank([column]) || [column] ="" ,"Unknown",
search("hospi",[column],,0) >0, "Hospitality",
"Other"
)

Anonymous
Not applicable

Hi @amitchandak ,

 

I've created a new calculated column to group categories and give a unique name. I would like to return "Unknown" in my calculated column wherever there's blank. I am unsure about some categories which was listed in main column. Hence I would like to return them as "Unknown". Current calculated column;

 

SWITCH(TRUE(),
CONTAINSSTRING (col1,"hospi") || CONTAINSSTRING(col2,"A0172") , "Hosiptals")
 
I have several other categories which I've extracted/grouped them from other columns
 
Can I include isblank function within same calculated column? If so then how?

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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