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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
chulpanvl
Helper I
Helper I

Table with measure cannot be filtered by a slicer

Hello everyone!

 

I want to visualize the data from a task tracker.

I have a table with task titles, empluees to whom they were assigned, due dates and dates of completion. See a pbix file here

 

I want to show in the target table visual only not finished tasks (completion date is Blank and due date is Blank) and I want to show which of them are overdue at a given date (the last date in a Date slicer, in this case 12/04/2023). For that I created a measure

is_overdue = 

var maxdate = LASTDATE('Calendar'[Date])

return IF(MAX('IT-DF'[due date]) < maxdate, "Yes", "No")

chulpanvl_0-1681289486087.png

However, when I try to filter the visual by the employee's name, the target is not filtered how I would expect it to be.

What I get and what I expect to get

chulpanvl_2-1681289719523.pngchulpanvl_4-1681289788257.png

Any advice how I could achieve my goal pls🙏

 

 

1 ACCEPTED SOLUTION

I think its because the measure always returns a valid, non-blank, result. Try changing it to

is_overdue =
IF (
    SELECTEDVALUE ( 'people'[assigned] ) = SELECTEDVALUE ( 'IT-DF'[name] ),
    VAR maxdate =
        LASTDATE ( 'Calendar'[Date] )
    RETURN
        IF ( MAX ( 'IT-DF'[due date] ) < maxdate, "Yes", "No" )
)

View solution in original post

4 REPLIES 4
johnt75
Super User
Super User

In the table visuals use 'people'[assigned] rather than 'IT-DF'[name]

This indeed works for my mock data but somehow doesn't for my real data. I included two identical table visuals with only one difference - the left one is without is_overdue measure, the right one - with the measure. For some reason the second visual assigns all lists of tasks to a person selected by slicer.

chulpanvl_0-1681297878992.pngchulpanvl_1-1681297900816.png

 

I think its because the measure always returns a valid, non-blank, result. Try changing it to

is_overdue =
IF (
    SELECTEDVALUE ( 'people'[assigned] ) = SELECTEDVALUE ( 'IT-DF'[name] ),
    VAR maxdate =
        LASTDATE ( 'Calendar'[Date] )
    RETURN
        IF ( MAX ( 'IT-DF'[due date] ) < maxdate, "Yes", "No" )
)

@johnt75 thank you for your help!!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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