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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Keep Specific value after filter in table

Hello everyone,

i have a payroll table that i want to filter out all 0 hour worker who dont have a fixed salary,

Screenshot 2022-10-11 155331.png


this is the main table with all employees

 

Screenshot 2022-10-11 155358.png


i want to filter out all employees with no work hours who dont have fixed salaries

so empA should be removed but empD should remain

but this is the resut i get

Screenshot 2022-10-11 155414.png


can someone he lp me i need emp D to be visable even if no hours since he has fixed salary

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Create a measure as below 

Flag = 
VAR _selemp =
    SELECTEDVALUE ( 'Table'[Name] )
VAR _emps =
    CALCULATETABLE (
        VALUES ( 'Table'[Name] ),
        FILTER (
            'Table',
            'Table'[Total Work Time] = 0
                && 'Table'[Fixed Salary In Local] = 0
        )
    )
RETURN
    IF ( NOT ( _selemp IN _emps ), 1, 0 )

2. Create a table visual and apply a visual-level filter with the condition(Flag is 1)

yingyinr_0-1665558942809.png

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Create a measure as below 

Flag = 
VAR _selemp =
    SELECTEDVALUE ( 'Table'[Name] )
VAR _emps =
    CALCULATETABLE (
        VALUES ( 'Table'[Name] ),
        FILTER (
            'Table',
            'Table'[Total Work Time] = 0
                && 'Table'[Fixed Salary In Local] = 0
        )
    )
RETURN
    IF ( NOT ( _selemp IN _emps ), 1, 0 )

2. Create a table visual and apply a visual-level filter with the condition(Flag is 1)

yingyinr_0-1665558942809.png

Best Regards

Anonymous
Not applicable

Thank you very much

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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