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
RWalet
Regular Visitor

Slicer with AND to only filter certain lines

Hi,

 

I am currently designing a dashboard for our project manager, everything is nearly finished besides one thing which I cant seem to find out how it can be done in PowerBI. So here is the scenario:

 

I have a table 'Job Planning Lines' which contains data regarding, budget lines, planned activities and timesheet lines. So we have the following lines on the dashboard:

Task no.Line typeDateResourceWork typeHours
1Budget + Billable29-6-2021AB1D2
1Budget24-6-2021ZDEVD-2
1Budget29-6-2021AB1(blank)2

 

The problem is, that our project managers dont want the see the last lines, the one without a Worktype if the date has past, but they still want to see the lines that do have a Worktype. Idealy they can use a slicer or any other functionality to set the date that they want you use on this particular filter so i just doesnt use today's date as part of the filter.

 

 I tried getting the date from a slicer and use that as part of a filter/measurement, but without any luck. It would be awesome if i could get some help with this!

 

Thanks in advance

Robert-Jan

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @RWalet ;

You could could a calendar date as a slicer , and then create a flag measure :

1.create a calendar date table.

slicer = CALENDAR(DATE(2021,6,29),DATE(2021,7,31))

2.create a flag measure .

flag = IF(MAX('Table'[Date])<MAX('slicer'[Date])&&MAX([Work type]) =BLANK(),1,0)

3.apply the measure into the filter.

vyalanwumsft_0-1627274242687.png

The final output is shown below:

vyalanwumsft_1-1627274331095.png

Best Regards,
Community Support Team_ Yalan Wu
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

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @RWalet ;

You could could a calendar date as a slicer , and then create a flag measure :

1.create a calendar date table.

slicer = CALENDAR(DATE(2021,6,29),DATE(2021,7,31))

2.create a flag measure .

flag = IF(MAX('Table'[Date])<MAX('slicer'[Date])&&MAX([Work type]) =BLANK(),1,0)

3.apply the measure into the filter.

vyalanwumsft_0-1627274242687.png

The final output is shown below:

vyalanwumsft_1-1627274331095.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@RWalet , You can visual level filter on work type not blank.

I am not able to relate with your today's logic

@amitchandak, Thank you for your quick answer, just filtering on the work type wont work, because that will also remove the lines in the future, and the project manager still want to have those visible.

 

So with the example above, if the date is past 29-07 they want to have the bottom line filtered out but still have the the othters lines visible. IF there was an additional line on th 31-07 with no Worktype than that line should still need to be visible.

 

Hope that clears it a bit up.

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.