cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper III

## Hide values in selected by slicer

Hi All,

I'm stuck on a problem and can't figure out.

data for referance is below:-

 Category Sub-Category C+Sub-Cat. Value Index A T AT 150 1 A T AT 146 2 A T AT 145 3 A T AT 121 4 A T AT 114 5 A V AV 142 1 A V AV 142 2 A V AV 110 3 A V AV 104 4 A X AX 141 1 A X AX 123 2 A X AX 120 3 A X AX 105 4 A X AX 100 5 A Z AZ 148 1 A Z AZ 126 2 A Z AZ 119 3 A Z AZ 102 4 B S BS 147 1 B S BS 141 2 B S BS 134 3 B S BS 113 4 B S BS 104 5 B S BS 101 6 B U BU 139 1 B U BU 125 2 B U BU 119 3 B U BU 117 4 B U BU 107 5 B W BW 148 1 B W BW 148 2 B W BW 128 3 B W BW 125 4 B W BW 122 5 B W BW 122 6 B Y BY 122 1 B Y BY 113 2 B Y BY 110 3 B Y BY 104 4 B Y BY 102 5

Hope everyone understand what i'm saying in image.

Regards,

1 ACCEPTED SOLUTION
Community Support

while in Power BI desktop, it is not possible to dynamically show/hide value or visual, one workaround is to to show blank for the value you want to hide.

I make a test and work out these results

“If I select category slicer then hide the value of sub-category”

“If I select sub-category slicer then hide the value of category”

Does these above meet your needs?

If so, create measures like this

```MAX OF CATEGORY =
IF (
HASONEVALUE ( Table1[Sub-Category] ),
BLANK (),
CALCULATE ( MAX ( Table1[Value] ), ALLSELECTED ( Table1[Category] ) )
)```
```MAX1 OF SUBCATEGORY =
IF (
CALCULATE (
HASONEVALUE ( Table1[Category] ),
ALLEXCEPT ( Table1, Table1[Category] )
),
BLANK (),
CALCULATE ( MAX ( Table1[Value] ), ALLSELECTED ( Table1[Sub-Category] ) )
)```

Best Regards

Maggie

3 REPLIES 3
Community Support

while in Power BI desktop, it is not possible to dynamically show/hide value or visual, one workaround is to to show blank for the value you want to hide.

I make a test and work out these results

“If I select category slicer then hide the value of sub-category”

“If I select sub-category slicer then hide the value of category”

Does these above meet your needs?

If so, create measures like this

```MAX OF CATEGORY =
IF (
HASONEVALUE ( Table1[Sub-Category] ),
BLANK (),
CALCULATE ( MAX ( Table1[Value] ), ALLSELECTED ( Table1[Category] ) )
)```
```MAX1 OF SUBCATEGORY =
IF (
CALCULATE (
HASONEVALUE ( Table1[Category] ),
ALLEXCEPT ( Table1, Table1[Category] )
),
BLANK (),
CALCULATE ( MAX ( Table1[Value] ), ALLSELECTED ( Table1[Sub-Category] ) )
)```

Best Regards

Maggie

Helper III

it's almost look-like what i want.

thanks for sharing your idea.

Regards,

NICK

Helper III

I have a doubt.

Can we show blank if both slicer not selected.

Regards,

NICK

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors