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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.