Forum Discussion
How to hide bars when drilling down in the same visualization?
- Anonymous8 years ago
Hi cavalierimauro,
Normally power bi not support this, you can refer to below steps to use measure to achieve your requirement.
Steps:
1. Use L2 to create new table.
Selector = VALUES('Sample'[L2])2. Write measure to check total level and switch display result formula.
Total = IF ( ISFILTERED ( 'Sample'[L2] ), IF ( SELECTEDVALUE ( 'Sample'[L2] ) IN ALLSELECTED ( Selector[L2] ), SUMX ( FILTER ( ALL ( 'Sample' ), [L1] IN VALUES ( 'Sample'[L1] ) && [L2] IN VALUES ( 'Sample'[L2] ) ), [Amount] ) ), SUMX ( ALL ( 'Sample' ), [Amount] ) )3. Create column chart with L1,L2 and measure, slicer with new table column.
Result:
Notice: new table not contains relationship to original one.
Regards,
Xiaoxin Sheng
Hi cavalierimauro,
Normally power bi not support this, you can refer to below steps to use measure to achieve your requirement.
Steps:
1. Use L2 to create new table.
Selector = VALUES('Sample'[L2])
2. Write measure to check total level and switch display result formula.
Total =
IF (
ISFILTERED ( 'Sample'[L2] ),
IF (
SELECTEDVALUE ( 'Sample'[L2] ) IN ALLSELECTED ( Selector[L2] ),
SUMX (
FILTER (
ALL ( 'Sample' ),
[L1] IN VALUES ( 'Sample'[L1] )
&& [L2] IN VALUES ( 'Sample'[L2] )
),
[Amount]
)
),
SUMX ( ALL ( 'Sample' ), [Amount] )
)
3. Create column chart with L1,L2 and measure, slicer with new table column.
Result:
Notice: new table not contains relationship to original one.
Regards,
Xiaoxin Sheng
That works on the expected way, many thanks for your help!
Regards