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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors