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
William_Ylab
Frequent Visitor

BOOLEAN Column only works with a FALSE value

Hey there.

 

I have a Sales table that goes like this:

 

Sales:

Id

IsTest

IsPaid

1

TRUEFALSE

2

TRUETRUE

3

FALSETRUE

 

A Brands table:

 

Brands:

BrandId

BrandName

1

Toyota

2

Honda

 

And lastly a Sales_Brands table:

SaleId

BrandId

1

1

2

1

3

2

 

Both Sales and Brands have relationships with Sales_Brands.

 

I have a Pie Chart report on Brands that uses "BrandName" as a legend and "BrandId" as Values. When I add a Page Filter using the "IsTest" column from Sales, my report updates itself normally.

 

When I add another Page Filter, this time using the "IsPaid" column from Sales, my Pie Chart only works with the FALSE value. If I select the TRUE value, my Pie Chart gets zero data.

 

The filter even correctly counts its corresponding values:

filter_doubt.png

 

I tried changing the Column type from Boolean to Whole Numbers and the behavior is still the same. Does anyone have any idea of why this is happening?

1 ACCEPTED SOLUTION

Hi @v-qiuyu-msft!

 

Thank you very much for your reply.

 

In the time that I've waited for it, I ended up discovering what the problem was. My SalesBrand table had its relationships set wrong. (I am noob in Power Bi yet and didn't know that Power Bi created its own relationships when we imported our data set to it)

 

What solved it was that I made the relationship between SalesBrand and Sales into a two-direction relationship instead of a single one (was from SalesBrand to Sales).

 

I can't fairly explain why this was happening but I can certainly tell that once I modified the relationship, everything started behaving like expected.

View solution in original post

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @William_Ylab,

 

From your description, it seems you set two page level filters, one is "IsTest" column from Sales, the other is "IsPaid" column from Sales, right?

 

Those two page level filters are AND condition. Assume you select False for IsTest and True for IsPaid, corresponding ID in Brand is 3, while there is no BrandId 3 in Brands table. Then the Pie chart display blank.

 

In your scenario, please check if the selected values for "IsTest" and  "IsPaid" has corresponding BrandId in Brands. If you are not sure, you can share the pbix file with those three tables with us.

 

Best Regards,
Qiuyun Yu

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

Hi @v-qiuyu-msft!

 

Thank you very much for your reply.

 

In the time that I've waited for it, I ended up discovering what the problem was. My SalesBrand table had its relationships set wrong. (I am noob in Power Bi yet and didn't know that Power Bi created its own relationships when we imported our data set to it)

 

What solved it was that I made the relationship between SalesBrand and Sales into a two-direction relationship instead of a single one (was from SalesBrand to Sales).

 

I can't fairly explain why this was happening but I can certainly tell that once I modified the relationship, everything started behaving like expected.

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.