The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi all,
I have one situation where I need to hide chart data where user select more then one filter value.
Suppose we have one filter where we have Pc, tablet, smartphone if user select pc, visual should filter out and should show the pc data.
if user select more than 1 value in filter, visual should be blank.
I can not convert filter to single select coz I have other visual where this filter should works as multiselect.
Can we create measure to handle this scenario.
Solved! Go to Solution.
@Anonymous ,
Try creating this measure:
FilteredColumn = Calculate(IF(
HASONEVALUE( 'Table'[yourslicercolumn] ),1,0 ), ALLSELECTED ( 'Table' ) )
Add the measure to the filter level visual of your chart and assign its value to 1
If you select more than one value in the slicer, it will appear blank as below:
@Anonymous ,
Try creating this measure:
FilteredColumn = Calculate(IF(
HASONEVALUE( 'Table'[yourslicercolumn] ),1,0 ), ALLSELECTED ( 'Table' ) )
Add the measure to the filter level visual of your chart and assign its value to 1
If you select more than one value in the slicer, it will appear blank as below:
You could do a check for only 1 item being selected by using HASONEVALUE. If its true then return your measure result, otherwise return blank.
User | Count |
---|---|
65 | |
61 | |
60 | |
53 | |
27 |
User | Count |
---|---|
181 | |
88 | |
70 | |
48 | |
46 |