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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Julian1
Microsoft Employee
Microsoft Employee

Adjusting output of the filter to capture time ranges that overlap it

I'm currently working on a project to capture how much time people spend in meetings during the day. 

 

As an example, I've created the following table visualization showing my meetings for the day:

Hugepickle_0-1599060823200.png

If I want to know about meeting time spent during the workday, I'd use a filter for my working hours of 9am-5pm:

Hugepickle_1-1599061128949.png

 

The problem is that this cuts off the first meeting in the list that goes from 8:30am-9:15am, since it started before the CollaborationStartTime. However, since the meeting ran into my working hours, I want it to show up in the list of meetings for that day. 

 

I understand that the filter is working as intended in this case. However, when I use a filter like this I wanted to show any appointment that in any way overlapped my 9am-5pm working hours, even if it started before or ended after that time range. Is this possible?

 

I've spent a few hours trying to figure this out and unfortunately haven't had much success. I'm new to DAX and PowerBI ( though learning a lot 🙂 and would welcome any thoughts.

 

 

1 ACCEPTED SOLUTION

@Julian1 - Sorry, "Selector" is a measure, not a calculated column. You would add it into the Filter pane at the visualization level for you table visual or whatever visual you are using.

 

I guess you could make it a calculated column pretty easily though now that I think about it.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Julian1 , a flag like

new column = if(([collbration End time] >= time(9:00:00) && [collbration Start time] <=time(17:00:00)),1,0)

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
Greg_Deckler
Community Champion
Community Champion

@Julian1 - Hello again. So, I generally use what I call a Complex Selector for this. https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534

 

Essentially, you implement whatever logic you want and return a 1 or 0 and then filter on that. In your case it might be:

Selector =
  SWITCH(TRUE(),
    [End] > [WorkingStart] && [End] < [WorkingEnd],1,
    [Start] < [WorkingEnd] && [Start] > [WorkingStart],1,
    [Start] > [WorkingStart] && [End] < [WorkingEnd],1,
    0
  )

You may need different logic.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks, Greg. Would "Select" in this case by a Calculated column on the table with my meeting data? If so, how do I get the DAX query to use the value selected in my filter? That's the part I've been struggling with.

 

It looks like "WorkingStart" and "Working End" would use the values provided by the filter shown in my screenshot above, just not sure how to make that work. 

 

I read your link and didn't get how to do that, perhaps just because I'm so new to this. 

@Julian1 - Sorry, "Selector" is a measure, not a calculated column. You would add it into the Filter pane at the visualization level for you table visual or whatever visual you are using.

 

I guess you could make it a calculated column pretty easily though now that I think about it.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks, Greg, this really helped. It took a while for me to figure it out but I got it to work.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors