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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Sreya
Helper II
Helper II

How to pass NULL values in IF statement in DAX

It is Solved Now by putting "" or BLANK() in IF statement
1 ACCEPTED SOLUTION
FarhanAhmed
Community Champion
Community Champion

Why exactly you want NULL values in return from DAX Query?

If you want to compare NULL values of/from Datasource then the BLANK() function should suffice your needs.

 

Ref: https://docs.microsoft.com/en-us/dax/blank-function-dax

 

 

In the original data source, the column evaluated by the BLANK function might have included text, empty strings, or nulls. If the original data source was a SQL Server database, nulls and empty strings are different kinds of data. However, for this operation, an implicit typecast is performed and DAX treats them as the same.







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
v-xuding-msft
Community Support
Community Support

Hi @Sreya ,

 

Glad that you have resolved it. Can you please reply your thread again and accept it as solution? Then this thread will be closed. Others who have the same questions will find the solution quickly and benefit from it. Thanks in advance!

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
FarhanAhmed
Community Champion
Community Champion

Why exactly you want NULL values in return from DAX Query?

If you want to compare NULL values of/from Datasource then the BLANK() function should suffice your needs.

 

Ref: https://docs.microsoft.com/en-us/dax/blank-function-dax

 

 

In the original data source, the column evaluated by the BLANK function might have included text, empty strings, or nulls. If the original data source was a SQL Server database, nulls and empty strings are different kinds of data. However, for this operation, an implicit typecast is performed and DAX treats them as the same.







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




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.