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.

Slicer for boolean value also shows "(Blank)" entries when selecting (False)

I'm using a very simple data model with only two tables.

 

DataModelDataModel

The values of this tables are the following:

+-----------+-------+      +----+-------------+------------+
| ProjectId | Hours |      | Id | ProjectName | IsInternal |
+-----------+-------+      +----+-------------+------------+
|         1 |    10 |      | 1 | Project1     | TRUE       |
|         1 |    20 |      | 2 | Project2     | FALSE      |
|         2 |    20 |      +----+-------------+------------+
| 3 | 40 | +-----------+-------+

When I now create a matrix with an slicer everything works as expected. When I select nothing all entries are shown, when I select True only the hours of Project1 are shown and when I select (Blank) only the values without a project are shown.

 

AllAll

True selectedTrue selected

(Blank) selected(Blank) selected

 

But if I select False in the slicer it shows Project2 but also all (Blank) values without a project are shown.

 

False selectedFalse selected

Is this an intended behaviour? In my opinion this very counterintuitive.

Status: Accepted
Comments
v-qiuyu-msft
Community Support

Hi @Anonymous, 

 

I have reported this issue internally: CRI 118357278. Will update here once I get any information. 

 

Best Regards,
Qiuyun Yu 

v-qiuyu-msft
Community Support
Status changed to: Accepted
 
v-qiuyu-msft
Community Support

Hi @Anonymous , 

 

I got below information from PG team: 

 

"This is currently by design and the details are below.

PowerBI inherits comparison semantics from 2 pre-existing products:
- Analysis Services
- PowerView (which inherits them from Analysis Services)
In Analysis Services DAX there are 3 types of comparison semantics:
1. Strict identity
Values need to match exactly and cross-type comparisons do not result in equality.  Cross-type comparison is done using weights for various types.
E.g. 0.0 != 0
2. Identity
Cross type comparison will result in match for the same values (0.0 = 0). However, values are matched exactly by their value.
E.g. Blank() != 0

3. Equality
Exact matches + Blank will match the default of the type.
E.g.  
"" (EmptyString) = Blank()
0 = Blank()
false = Blank()

 

DAX = (equal operator) has Equality semantics and will match Default(type) with Blank for all types it supports.

PowerView and subsequently PowerBI have a variations on the DAX semantics. In particular, PowerView initially started off by having Equality semantics as well, leveraging the equal operator in DAX.

Subsequent updates changed that behavior to eventually be as follows:

For string type - Identity semantics (empty string will not match Blank)
For all other types - Equality (the type's default will match Blank)
For all types - Blank comparison is strict (if Blank is the selection of a filter, only Blank will be returned and not the default of the type. This is achieved by leveraging ISBLANK() DAX function)

 

PowerBI inherits the PowerView behavior. Although it is not a consistent behavior, we cannot change it because a lot of reports will show different results and this is the only reason we have not corrected this behavior until now.

 

What I would recommend is to post an idea on ideas.powerbi.com regarding this as a future improvement. 
We could consider a feature to opt into having the Identity comparison semantics across a whole report but we will need customer feedback on this for it to be prioritized in future planning."

 

Best Regards,
Qiuyun Yu 

Anonymous
Not applicable

@v-qiuyu-msft thank you for your detailed answer 🙂

 

Do you maybe know of any way how to mitigate this problem until a possible fix?

 

Nevertheless I've posted an idea for this issue under the following link:

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/37628728-opt-in-for-identity-comp...

v-qiuyu-msft
Community Support

Hi @Anonymous, 

 

You can try to set visual level filter condition for the table visual. 

 

q5.PNG

 

Best Regards,
Qiuyun Yu 

Wenqing_Fu
Employee

We encounted the same issue. What's the status for this fix?