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
Dave2
Advocate I
Advocate I

BOOLEAN column, can't apply filter in Power BI Desktop?

I have a boolean true/false measure on one of my tables, but I'm having trouble applying a filter on it.  Is this a bug in Power BI Desktop, or am I doing something wrong?

 

When I add the measure to the filters, it shows like this:

BooleanIssue-Filter.png

 

That is, it doesn't provide anything to change (I just want to show where value is TRUE)... so "Apply filter" is always greyed out.

 

It shows fine in the table:

BooleanIssue-TableView.png

 

And the model for the measure shows fine as well:

BooleanIssue-Model.png

 

As a workaround I'm going to try changing the measure to return a 1/0 numeric value instead, but thought I'd ask in case anyone else has seen this and has a way to apply a filter when the measure is a boolean.  I'd prefer leaving it as the type it actually is.

 

(Note: This measure is required as it actually combines information from two different columns; so I can't just use a Sales<>0 filter.)

 

I'm running Power BI Desktop version 2.37.4464.461 (July 2016).

 

Dave

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

That's hysterical, I just posted this as an Idea a couple days ago because I ran into the same thing. Perhaps I should have posted it as an Issue?

 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15646758-allow-filtering-of-true-...

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

8 REPLIES 8
Flaggonman
Frequent Visitor

Just dropping by to say that it's December 2023 and this bug is still there in Power BI desktop 🙃

Anonymous
Not applicable

Still an issue in apr 2019
Just came up against it
Anonymous
Not applicable

This is still an issue here - PowerBI 2.42.4611.701 64-bit (January 2017)

 

Seems they might have changes some code?

Because I see the "Has Sales (All)" part, but when expanding the filter, I don't see the

 

"Show items when the value:

Apply filter"

 

Still an issue as of PBI Desktop May edition. Pretty egregious bug, but at least there's an easy workaround as suggested above.

------------------------------------------------
1. How to get your question answered quickly - good questions get good answers!
2. Learning how to fish > being spoon-fed without active thinking.
3. Please accept as a solution posts that resolve your questions.
------------------------------------------------
BI Blog: Datamarts | RLS/OLS | Dev Tools | Languages | Aggregations | XMLA/APIs | Field Parameters | Custom Visuals

I'm not sure the workaround works any more, as I have a field that contains 1,0, or null. I didn't mean it to be a boolean field, but no matter what data type I make it (whole number, decimal, fixed decimal) Power BI still reads it as a Boolean, and I can't filter it, or get formulas to recognize the difference between 0 and null. Plus, I can't use any fields that I have calculated off that field in other calcualtions, because Boolean fields apparently can't be aggregrated a second time??? I'm use the March 2017 version of Power BI. This glitch has caused me hours of frustration... 

 

Any suggestions or fixes???

CahabaData
Memorable Member
Memorable Member

that's good to note

 

so instead one should use an IF  >0,"True", "False"

... approach where you really generate a value....  or 1,0 as you suggest if you prefer a number.....

 

rather than a Has Data function....

www.CahabaData.com
Greg_Deckler
Super User
Super User

That's hysterical, I just posted this as an Idea a couple days ago because I ran into the same thing. Perhaps I should have posted it as an Issue?

 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15646758-allow-filtering-of-true-...

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler and @CahabaData, thanks for confirming this.

 

I've gone ahead with the workaround... in my case, I made it a whole number type and used:

Measure = IF ( Condition, 1, 0 )

 

This works, even if it may seem a bit strange to the end users.  Hopefully @Greg_Deckler's idea gets implemented; it does seem like a bug, given how the UI reacts to the boolean field.

 

Thanks again,

Dave

 

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.