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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
brankocareer
Helper I
Helper I

How to handle blank

Hi all,

 

I am writing a simple DAX to create a new column :

If Different = IFISBLANK('Energy_FTE_View'[If Vacancy Subtype]), 0,1)
But, I take one ID for example, there is a "blank" value, which is considered as non-blank, what can I do?

 
Thank you in advance!
Branko
brankocareer_1-1717093266251.png

 

 
1 ACCEPTED SOLUTION
mark_endicott
Super User
Super User

@brankocareer - If you want to handle this in DAX you could do:

 

IF( OR(ISBLANK('Energy_FTE_View'[If Vacancy Subtype]), 'Energy_FTE_View'[If Vacancy Subtype] = " ") , 0,1)

 

But you will be guessing whether it is "" or " " or "   " and so on. In general I would say you are better off completing this in Power Query by using the Replace Values transformation. This will be easier than trying to account for every eventuality in DAX.

View solution in original post

2 REPLIES 2
mark_endicott
Super User
Super User

@brankocareer - If you want to handle this in DAX you could do:

 

IF( OR(ISBLANK('Energy_FTE_View'[If Vacancy Subtype]), 'Energy_FTE_View'[If Vacancy Subtype] = " ") , 0,1)

 

But you will be guessing whether it is "" or " " or "   " and so on. In general I would say you are better off completing this in Power Query by using the Replace Values transformation. This will be easier than trying to account for every eventuality in DAX.

@mark_endicott  Thank you! It works!

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

Top Kudoed Authors