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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Jos13
Helper III
Helper III

Filter not working

Hi Team,

I just have to find whether a particular employee's data is there in the table by filtering month and task. I have created a measure as follows.

Measure = IF(SELECTEDVALUE('Table'[EmpId])=VALUES('Table'[EmpId]),"Yes","No")
But this is not working as expected.
image 1.png
Kindly help me on this.
1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Jos13 

 

Sure, try this.

Measure = 
IF( 
    ISFILTERED( 'Table'[Empid] ),
    IF( NOT ISEMPTY( 'Table' ), "Yes", "No" )
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

View solution in original post

7 REPLIES 7
Jos13
Helper III
Helper III

Hi,

The above mentioned measures return a value even if the employee id is not selected. This measure should return a value only when the employee id is selected otherwise it can return blank.

 

Thanks,

Jos

Mariusz
Community Champion
Community Champion

Hi @Jos13 

 

Sure, try this.

Measure = 
IF( 
    ISFILTERED( 'Table'[Empid] ),
    IF( NOT ISEMPTY( 'Table' ), "Yes", "No" )
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

tex628
Community Champion
Community Champion

Can you make your slicer single select or do you need to have the ability to select several employees? 

If that is the case, how do you want the logic to behave when there is more than one employee selected?

/ J


Connect on LinkedIn

Single select would be fine. But if I make emp id slicer single select, is it possible for me to select other taks ? Report has to work in the following way:

User selects month first then task and then employee.

 

Thanks,

Jos

amitchandak
Super User
Super User

@Jos13 , try like

calculate(if(Max('Table'[EmpId]) =SELECTEDVALUE('Table'[EmpId]),"Yes","No"),values('Table'[EmpId]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Mariusz
Community Champion
Community Champion

Hi @Jos13 

 

Try this, 

Measure = IF( NOT ISEMPTY( 'Table' ), "Yes", "No" )

 If not what you need, please provide the expected outcome.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

tex628
Community Champion
Community Champion

Change it to,

Measure = IF(COUNTROWS('Table')=1,"Yes","No")


Br,
J


Connect on LinkedIn

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.