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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Iterate with LOOKUPVALUE

Hello all, I have been stuck on this for the whole afternoon, I feel like I'm just missing something...

 

I manage an email app data and have 3 tables: 

 

Main Table

listing all events occurences

 

Send Tab

Detailing the "Send" event 

 

Receive Tab

Detailing the "Receive" event

 

I'm trying to calculate the response time to any given email

=> Email Send date - Email Receive date

 

 

Email send date is: 'Send Tab'[Date]. Email receive date is: 'Receive Tab'[Date].

The relations between the tabs are through the main table with Event ID.

 

Here are the tables:

Main:

Event IDEmailDateEvent type
1alexis27/3/18 15:45send
2thibaud27/3/18 15:45receive
3leonard27/3/18 15:45receive
4Leonard27/3/18 16:06send
5fabrice28/3/18 16:05receive
6fabrice28/3/18 16:10receive
7Alexis28/3/18 16:06receive
8fabrice28/3/18 16:10send
9fabrice28/3/18 16:15send

 

Send Tab

Event IDEmailDateMessage IDIn Reply To
1alexis27/3/18 15:45123 
4leonard27/3/18 16:06 345123
8fabrice28/3/18 16:10 789456
9fabrice28/3/18 16:15 462567

 

 

Receive Tab

Event IDEmailDateMessage ID
2Thibaud27/3/18 15:45123
3leonard27/3/18 15:45123
5Alexis28/3/18 16:06753
6fabrice28/3/18 16:05456
7fabrice28/3/18 16:10567

(Twice the same Msg ID cause the original msg had 2 recipients) 

 

From what I understand I have to do
Response Time table =
LOOKUPVALUE(
'receive tab'[Date];
'receive tab'[Message ID];
'send tab'[In Reply To]
)

 

I get error "A TABLE OF MULTIPLE VALUES WAS SUPPLIED WHERE A SINGLE VALUE WAS EXPECTED"

 

I've tried to summarize by msg ID or iterate with filter through each cell but nothing is working...

      

The result I'm looking for is either a measure or a calculated column if we cannot directly do a measure.

EG: A column in "Send Tab" with response time if email is reply... 


There will be a bit of data (500k rows+) so I need to try to find something optimized. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hey @ChrisMendoza,

 

Thanks for your answer, yes it is pretty much what I was looking for

 

I understood where I went wrong: I had duplicate values in the Search column.... So obvious...

 

The result I was looking for:

 

Original Email Received Date = 
LOOKUPVALUE( 
    'receive tab'[Date];
    'receive tab'[Message ID];
    'send tab'[In Reply To];
    'receive tab'[Email];
    'send tab'[Email] 

)

 

Thanks again Chris, idk how I struggled for 3 hours... 

 

Best,

L

View solution in original post

3 REPLIES 3
ChrisMendoza
Resident Rockstar
Resident Rockstar

@Anonymous,

 

Is your expected outcome for your example tables below?:

1.PNG






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Anonymous
Not applicable

Hey @ChrisMendoza,

 

Thanks for your answer, yes it is pretty much what I was looking for

 

I understood where I went wrong: I had duplicate values in the Search column.... So obvious...

 

The result I was looking for:

 

Original Email Received Date = 
LOOKUPVALUE( 
    'receive tab'[Date];
    'receive tab'[Message ID];
    'send tab'[In Reply To];
    'receive tab'[Email];
    'send tab'[Email] 

)

 

Thanks again Chris, idk how I struggled for 3 hours... 

 

Best,

L

Hi @Anonymous,

 

Have you solved your problem?

 

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

Best  Regards,

Cherry

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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