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
MCornish
Responsive Resident
Responsive Resident

COALESCE removes my filters

Hi All

 

Im using the COALESCE function (same problem happens with an IF) to return a 0 when a measure is blank. Without the COALESCE the measure works fine.

I have a table that lists customers which is filtered by salesperson. If I add the measure to the table, it filters the table to only those customers where the measure is > blank. I selected Show Items With No Data and now I see all filtered customers with blanks.

 

The COALESCE was used to swap this blank out for a 0. However when I add the measure to the table it lists every customer in the raw table and completely ignores my filter. Adding the salesperson into the table shows the selected salesperson against every customer which is incorrect.

 

Without COALESCE:

good.PNG

With COALESCE:

bad.PNG

See how the customer number is now every customer.

 

Any help would be greatly received

1 ACCEPTED SOLUTION
MCornish
Responsive Resident
Responsive Resident

Ok. I found the issue. 

 

Issues was in the relationship between two other tables (it's a big model)

View solution in original post

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Good day, I have the same problem with a database and I can't quite understand the solution of this case. Could you help me please?

Thank you, greetings

amitchandak
Super User
Super User

@MCornish , +0 , coalesce all those force a left join with the table and this shows all other values.

While yes I agree it forces a left join, it should still respect the filters placed on the customer table

MCornish
Responsive Resident
Responsive Resident

Ok. I found the issue. 

 

Issues was in the relationship between two other tables (it's a big model)

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.