cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
savvari Frequent Visitor
Frequent Visitor

calculated column doesn't show blanks

I have a column in the dataset (Query), which has 3 values: 1, 0 and null.

When creating visualizations, I figured I need a different representation of that column. So, I created a Calculated Column:

 

CalcCol = IF(Col1 = 1, "Yes", IF( Col1 = 0, "No", Blank()))

 

But I see only Yes, No values in the new calculated column. I don't see Blanks at all. I think they are combined with No.

 

However, if I crate a Custom column in Edit Queries window to achieve the same, I get all three values.

 

I want to understand why this is the case and would really like to have the calculated column work the desired way, instead of having to create Custom column in edit queries (where it means refreshing the entire dataset and is clumsy given I have lot of huge queries).

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-danhe-msft Super Contributor
Super Contributor

Re: calculated column doesn't show blanks

Hi @savvari,

I have asked the Product Group and they replied that: "In DAX, the comparison operator = performs equivalence comparison. Since 0 and BLANK are equivalent values, operator = returns true when comparing 0 to BLANK. Users can use DAX function IsBlank to detect BLANK values. "

Hope it could help you.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-danhe-msft Super Contributor
Super Contributor

Re: calculated column doesn't show blanks

Hi @savvari,

I have asked the Product Group and they replied that: "In DAX, the comparison operator = performs equivalence comparison. Since 0 and BLANK are equivalent values, operator = returns true when comparing 0 to BLANK. Users can use DAX function IsBlank to detect BLANK values. "

Hope it could help you.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

v-danhe-msft Super Contributor
Super Contributor

Re: calculated column doesn't show blanks

Hi @savvari,

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
savvari Frequent Visitor
Frequent Visitor

Re: calculated column doesn't show blanks

Thanks Daniel. This is really helpful. It's just that "Column from Examples" in Edit Queries, works differently. Smiley Happy

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 47 members 877 guests
Please welcome our newest community members: