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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
chadcook3
Frequent Visitor

Advanced Condition Column lookup between datetimes

Hi All I have 2 data sets that i want to combine as one. The first is a call data base where i have start and end time of the call The second is the time a ticket was submitted I want to capture the ticket number of each call

**Example Calls Data** Call Start Call End Username

    21/08/2018 9:40 21/08/2018 9:52 Bob
    21/08/2018 9:30 21/08/2018 9:42 Jane

**Example Tickets Data** Ticket Number Submited Username

    123456 21/08/2018 9:41 Bob.Smith42
    123457 21/08/2018 9:41 Jane.Bloggs17

The Third issue is the usernames don't match but i have many solutions for that. **Ideal Result** Call Start Call End Username Ticket Number

    21/08/2018 9:40 21/08/2018 9:52 Bob 123456
    21/08/2018 9:30 21/08/2018 9:42 Jane 123457

I can do this with Excel macro's or SQL, then load the dataset but i'd love to be able to do it directly through Power BI. Any help would be appreciated Thanks

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @chadcook3,

 

You can split the column "Username" of "Example Tickets Data" in the Query Editor with the built-in function. Then it's easy to get "Ticket Number". The concern could be the duplicate usernames. Are there any other conditions we can apply?

 

Best Regards,

Dale

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

Hi,

 

If the Name can be made the same between both datasets, then we can solve this problem using DAX.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.