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

Time span

Dear All, 

I have particular issue. 

 

LocationStart TimeEnd Time
Start04-11-2023, 08:01:23 AM04-11-2023, 08:38:25 AM
Carrefour City Centre04-11-2023, 08:38:25 AM04-11-2023, 08:38:41 AM
Carrefour City Centre04-11-2023, 08:38:41 AM04-11-2023, 08:42:38 AM
Carrefour City Centre04-11-2023, 08:42:38 AM04-11-2023, 08:42:48 AM
Carrefour City Centre04-11-2023, 08:42:48 AM04-11-2023, 09:18:20 AM
MONOPRIX SHOP04-11-2023, 09:18:20 AM04-11-2023, 09:18:33 AM
MONOPRIX SHOP04-11-2023, 09:18:33 AM04-11-2023, 09:34:57 AM
carrefour,landmark04-11-2023, 09:34:57 AM04-11-2023, 10:43:29 AM
carrefour,landmark04-11-2023, 10:43:29 AM04-11-2023, 10:43:40 AM
carrefour,landmark04-11-2023, 10:43:40 AM04-11-2023, 10:44:21 AM

 

 

TimeRequired DAta
04-11-2023, 08:50:07 AMCarrefour City Centre
04-11-2023, 09:36:30 AMcarrefour,landmark

 

There are two Data table.I would like to pull the location from first table according to time in 2nd table.But the problem is that mentioned time in 2nd table is precise and it is in between start time and end time in first table..Please help..

2 ACCEPTED SOLUTIONS
danextian
Super User
Super User

Hi @Sajeerahammed ,

 

Try this calc column in  Table02:

Location =
CALCULATE (
    MAX ( Table01[Location] ),
    FILTER (
        Table01,
        EARLIER ( Table02[Time] ) <= Table01[End Time]
            && EARLIER ( Table02[Time] ) >= Table01[Start Time]
    )
)

danextian_0-1699087421192.png

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

Sajeerahammed
Regular Visitor

Thanks brother...Problem solved

View solution in original post

3 REPLIES 3
Sajeerahammed
Regular Visitor

Thanks brother...Problem solved

danextian
Super User
Super User

Hi @Sajeerahammed ,

 

Try this calc column in  Table02:

Location =
CALCULATE (
    MAX ( Table01[Location] ),
    FILTER (
        Table01,
        EARLIER ( Table02[Time] ) <= Table01[End Time]
            && EARLIER ( Table02[Time] ) >= Table01[Start Time]
    )
)

danextian_0-1699087421192.png

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Brother...

Can we add salesman criteria also on desired output??thanks in advance for your support

StartSalesman NameStart TimeEnd Time
Start 04-11-2023, 08:01:23 AM04-11-2023, 08:38:25 AM
Carrefour City CentreSuraj04-11-2023, 08:38:25 AM04-11-2023, 08:38:41 AM
Carrefour City CentreSuraj04-11-2023, 08:38:41 AM04-11-2023, 08:42:38 AM
Carrefour City CentreSuraj04-11-2023, 08:42:38 AM04-11-2023, 08:42:48 AM
Carrefour City CentreSuraj04-11-2023, 08:42:48 AM04-11-2023, 09:18:20 AM
MONOPRIX SHOPSuraj04-11-2023, 09:18:20 AM04-11-2023, 09:18:33 AM
MONOPRIX SHOPSuraj04-11-2023, 09:18:33 AM04-11-2023, 09:34:57 AM
carrefour,landmarkRaja04-11-2023, 09:34:57 AM04-11-2023, 10:43:29 AM
carrefour,landmarkRaja04-11-2023, 10:43:29 AM04-11-2023, 10:43:40 AM
carrefour,landmarkRaja04-11-2023, 10:43:40 AM04-11-2023, 10:44:21 AM

 

TimeSalesmanDesired output
04-11-2023, 08:50:07 AMSurajCarrefour City Centre
04-11-2023, 09:36:30 AMRajacarrefour,landmark

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors