Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PowerrrBrrr
Helper III
Helper III

Filter not working as expected

I have below which for some reason gives me (Blank) even if there is no selection made. Selection is made by clicking on a different cards visual in the report. So if there is no card selected it should give me "No Id Selected"  but instead it gives me "Selected ID:"
What is wrong with below DAX?

 

Selected Pump = IF(
ISFILTERED(Class[Id]),"Selected ID:"
SELECTEDVALUE(Class[Id]),"No Id Selected"
)
2 ACCEPTED SOLUTIONS
v-henryk-mstf
Community Support
Community Support

Hi @PowerrrBrrr ,

 

According to your description, I have done tests that show the results very well, with the following reference.

M_ = 
IF (
    ISFILTERED ( Class[ID] ),
    "Selected ID:" & SELECTEDVALUE ( Class[ID] ),
    "No Id Selected"
)

vhenrykmstf_0-1635217222310.png

vhenrykmstf_1-1635217232680.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

v-henryk-mstf
Community Support
Community Support

Hi @PowerrrBrrr ,

 

I reproduced your problem and it is the filter condition in Filters that is causing the problem.

vhenrykmstf_0-1635234781473.png

 

Remove the fields from Filter on all pages and filter directly by slicer. Refer to the following.

vhenrykmstf_1-1635234864781.png

 


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-henryk-mstf
Community Support
Community Support

Hi @PowerrrBrrr ,

 

I reproduced your problem and it is the filter condition in Filters that is causing the problem.

vhenrykmstf_0-1635234781473.png

 

Remove the fields from Filter on all pages and filter directly by slicer. Refer to the following.

vhenrykmstf_1-1635234864781.png

 


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yes that works, but would like to know why this does not work with Filter on Pages??I am here just cleaning the data and removing blank

Hi @PowerrrBrrr ,

 

ISFILTERED function is to return TRUE when the specified table or column is directly filtered, otherwise it returns FALSE. when the data or blank in Filter is not cleared, the judgment condition will still be in effect. This is the cause of the error.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-henryk-mstf
Community Support
Community Support

Hi @PowerrrBrrr ,

 

According to your description, I have done tests that show the results very well, with the following reference.

M_ = 
IF (
    ISFILTERED ( Class[ID] ),
    "Selected ID:" & SELECTEDVALUE ( Class[ID] ),
    "No Id Selected"
)

vhenrykmstf_0-1635217222310.png

vhenrykmstf_1-1635217232680.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-henryk-mstf 

I did your way and its still not working..there is no error. please see the below screen shot. I have not selected anything, still its takes the first condition in filter

PowerrrBrrr_0-1635232931828.png

 

amitchandak
Super User
Super User

@PowerrrBrrr , Hope you have joined strings with &

Selected Pump = IF(
ISFILTERED(Class[Id]),"Selected ID:" & SELECTEDVALUE(Class[Id]),"No Id Selected"
)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Yes i have appended with & but it still do not work

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.