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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
TessGaston
Regular Visitor

How to connect data with exact time in one dataset to a time range in other dataset

Hello,
please could somebody help me with my problem?

I have many XML files with call logs and one excel file with attendance of operators.

XML file contains ID of the phone, date of the call and some other stuff.

Excel file contains ID of the phone, date of the attendance of the operator, time from, time to (when the operator started and finished work that day) and the operator's name.

What I need is to add a new column in the XML files in Power BI and type in the name of the operator who managed the call. So it should search somehow the ID of the phone with the date and then check if the time is older or equal to the time "from" and simultaneously that the time is younger or equal to the time "to", if everything meet the conditions, than it should type in the column "name" the name from the row which met the conditions.

Is that possible in Power BI somehow? I hope it is because I need to automatize this process fullfully (with no manual step like preparing CSV files) so I would be able to create reports from the data.

Thank You!!!

Tereza

1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @TessGaston

 

You may use SELECTEDVALUE Function. Show you an example as below:

 

Measure =
MINX (
    FILTER (
        Excel,
        SELECTEDVALUE ( XML[Time] ) > Excel[Start]
            && SELECTEDVALUE ( XML[Time] ) < Excel[End]
    ),
    Excel[Name]
)

Untitled.png

 

Column =
MINX (
    FILTER ( Excel, XML[Time] > Excel[Start] && XML[Time] < Excel[End] ),
    Excel[Name]
)

Regards,

Cherie

Community Support Team _ Cherie Chen
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

1 REPLY 1
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @TessGaston

 

You may use SELECTEDVALUE Function. Show you an example as below:

 

Measure =
MINX (
    FILTER (
        Excel,
        SELECTEDVALUE ( XML[Time] ) > Excel[Start]
            && SELECTEDVALUE ( XML[Time] ) < Excel[End]
    ),
    Excel[Name]
)

Untitled.png

 

Column =
MINX (
    FILTER ( Excel, XML[Time] > Excel[Start] && XML[Time] < Excel[End] ),
    Excel[Name]
)

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

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