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.
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:
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:
And the model for the measure shows fine as well:
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
Solved! Go to Solution.
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?
Just dropping by to say that it's December 2023 and this bug is still there in Power BI desktop 🙃
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.
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???
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....
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?
@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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
80 | |
66 | |
62 |
User | Count |
---|---|
145 | |
111 | |
104 | |
84 | |
64 |