cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nazdac911
Helper I
Helper I

The relationship between slicer status and visual filtering

Hi all 

I am using a simple measue to detect whether a slicer colum is filteres or not : 

_is_product_filtered =
CALCULATE(
    IF(
        ISFILTERED(Dim_product[product_name]) , 1 , 0) ,
        ALLSELECTED(Dim_product[product_name])
)
or 
INT(
    NOT (ISBLANK(SELECTEDVALUE(Dim_product[product_name]) ))
 
And then I am applying this filter on my visual , I notice that it work great with some visuals but its not working with others (just like labels ) 
Nazdac911_0-1670503332727.png

and also why I cant apply one filter to the whole page ? 

Is their is a rule for that ? 
Thanks in advance 
regards 
2 REPLIES 2
amitchandak
Super User
Super User

@Nazdac911 , allselected should always work

 

_is_product_filtered =
int(CALCULATE(
ISFILTERED(Dim_product[product_name]) ,
ALLSELECTED(Dim_product[product_name])
))



Learn Power BI - Full Course with Dec-2022, with new DAX functions like Window, Index, Offset !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Formatted Profit and Loss Statement with empty lines

Hi Mitchendak 
thank you for the new script , but this also cant apply to label visual ?

regards 

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.