Forum Discussion
Help with measures to hide data based on filter selection
- 5 years ago
Hi, rbreneman ;
Please try to create a new table and establish a relationship:
new = SUMMARIZE('BOCES and N/RC',[DISTRICT_SHORT_NAME])and create a ralationship:
then create a measure:
IsFiltered = IF(ISFILTERED(new[DISTRICT_SHORT_NAME]),1,0)The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, rbreneman ;
For ISFILTERED() funtion , TRUE when ColumnName is being filtered directly, or when any column of TableName is being filtered directly.
And in your 2 option (ISFLRER() measure) , your visual apply measure 'IsFiltered' into Filters on this Visual, And it's set to not 0, so no matter what your slicer chooses, your chart visual is always going to be filtered, so it's always going to return 1 in current chart visual, compared to the Card visual, it's not filtered, so it can change 1 or 0 depending on what the slicer chooses.
ISFILTERED is for any filter, including Slicer or filter. So in this case, it is more applicable to Discount instead of ISFILTERED.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much for your reply. That makes sense. My only problem with using the calculate measure for this is how to work around if the user wants to select all in the slicer. I want the visual to behave like this:
- Do not show data when nothing is selected in slicer (working today)
- Show data when one or more items are selected in slicer (working today)
- Show data when all items are selected in slicer (not working, measure reverts to "0" and data disappears)
The pbix you created and attached shows this behavior (screenshot below). If you multi-select A, B, C, and D in the slicer, the table that is filtered by calculate disappears. I need to be able to keep the visual blank until a user chooses something in the slicer, but also need to account for if they select all in the slicer. Is this possible? Thanks!