Power BI
Needs VotesAdd a "Hide Members" option to the standard Slicer/Filter for empty and "equal to parent" hierarchy items
Pär Adeen on 15 May 2021 05:50:21
The Hierarchy slicer has a Hide Members option for eliminating (not showing) empty (or equal to parent) hierarchy items, but the standard slicer doesn't have this feature
As this is missing in the standard slicer and it's also impossible to implement a measure level filter doing the same thing. Yes I might be able to use the Hierarchy slicer instead, but that slicer doesn't have the Dropdown option.
The reason it's impossible to mimic the Hierarchy slicer Hide member feature using a visual filter is that the measure ([VisualLevelFilterMeasure] below) will be evaluated within the scope shown below where it's not possible to use ISINSCOPE() or ISFILTERED() to figure out a current selected hierarchy level and without this it will not be possible to to a correct filtering using a measure in a visual level filter
FILTER (
KEEPFILTERS (
ADDCOLUMNS (
KEEPFILTERS (
SUMMARIZE ( VALUES ( 'DIM' ), 'DIM'[Level1], 'DIM'[Lelvel2], 'DIM'[Level3], 'DIM'[Level4] )
),
"@", [VisualLevelFilterMeasure]
)
),
NOT ( ISBLANK ( [@] ) )
My suggestion is that the visual itself will filter out hierarchy level items that is either empty and/or having the same value as the parent, just like the Hierarchy slices does, and this is very easy done when having complete control of the DAX query (or doing it just within the slicer code).
An alternative option would be to att the Drop down feature to the Hierarchy slice.
A third option could be to change the implementation of the visual level filter in the standard slicer so that we in our measures can operate on the selected hierarchy levels in the slicer