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