Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Excluding Blank Values from Slicer and Matrix Visuals in Power BI

Hello everyone,

I'm using a field parameter in Power BI as shown below for a slicer and to dynamically add columns to a matrix visual based on slicer selections:

```dax
Wind Investment Slicer = {
("Name1", NAMEOF('Calculations'[Name1_measure]), 1),
("Name2", NAMEOF('Calculations'[Name2_measure]), 2),
("Name3", NAMEOF('Calculations'[Name3_measure]), 3),
("Name4", NAMEOF('Calculations'[Name4_measure]), 4),
("Name5", NAMEOF('Calculations'[Name5_measure]), 5),
("Name6", NAMEOF('Calculations'[Name6_measure]), 6)
}
```

Can we exclude options from the slicer and matrix visual if their corresponding measure returns blank?
For example, if `[Name3_measure]` is blank, "Name3" shouldn't appear as an option in the slicer.
This question arises from handling a parameter with 26 measures and 5 slicers in my report, where typically only 5-6 measures have values for certain selections. I aim to display only these non-blank measures in the field slicer.

Thank you in advance for any guidance.
Best regards.

2 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for you reply 
      What I am trying to do is show/hide unselected columns , or coumn that has blank values 
      and for this I dont have this option :