Forum Discussion

dewitweb's avatar
dewitweb
Frequent Visitor
2 years ago
Solved

Visual filter in Power BI Desktop not working as expected

Hello,

 

I have a Power BI Report with a visual matrix. I present a column with values 'blank', '0' and '1'. These are numbers. I count the disctinct count of companies (rows) from my table.

 

 

 

 

 

 

When i add a filter to this table I get unexpected results. The 1's are filtered as expected. The blank's are not.

Why are the blanks showing, when (as shown in the last picture) I did not select them?

 

 

 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi dewitweb ,

    Depending on the information you have provided, blank values can sometimes behave differently than other values such as '0' or '1' in Power BI. This may be due to the way Power BI interprets whitespace in the context of filters and calculations. You can follow these steps below:

    1.Add an index column.

    2.Put Index column in Filter.

    Final output:

     

    How to Get Your Question Answered Quickly - Microsoft Fabric Community

    If it does not help, please provide more details with your desired out put and pbix file without privacy information.

     

    Best Regards,

    Ada Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi dewitweb ,

    Depending on the information you have provided, blank values can sometimes behave differently than other values such as '0' or '1' in Power BI. This may be due to the way Power BI interprets whitespace in the context of filters and calculations. You can follow these steps below:

    1.Add an index column.

    2.Put Index column in Filter.

    Final output:

     

    How to Get Your Question Answered Quickly - Microsoft Fabric Community

    If it does not help, please provide more details with your desired out put and pbix file without privacy information.

     

    Best Regards,

    Ada Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • dewitweb's avatar
      dewitweb
      Frequent Visitor

      Accepted as solution, because it put me on a right track. I did manage to solve the problem by adding a custom conditional column instead of index. 

       

      In the end I redid my datamodel and thus circumvented the filter context issue, the way I think is the best way. 

       

      Thanks to Anonymous