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

How to Pull in Value from one table to another to perform a test (Vlookup - like within PBI ?)

I'm not entirely sure if I am wording the subject properly. Essentially, I have one query from a ticketing data that has:
Table 1
TicketDuration   (ie 60 minutes, 45 minutes, 32 minutes, 75 minutes, 10 minutes, 5 minutes, etc etc)
SLAType             (ie 001, 002, 003, 001, 001, 003)

In another table I have
Table 2
SLAType             (ie 001, 002, 003)
SLADuration     (50 minutes, 60 minutes, 10 minutes)

Where Table 2 has the varying types of SLA's a ticket might have (ie Urgent, non urgent, etc)
What I am trying to do within Table1 is be able to tell if each TicketDuration < SLADuration and, if so, value is TRUE (ie SLA Met) otherwise value is FALSE.
I would typically do this, in Excel, by doing a vlookup on Table 1 to pull the SLADuration Value from Table 2 and then create a column that says =IF(TicketDuration < SLADuration, True, False)

I don't know how to reference Table 2 from Table 1 to do this - or if I even have to with there being a relationship between the two that I defined (SLAType) I'd like to create a stacked bar chart that shows total amount of tickets with comprised of those that met SLA and didn't).

I'm a SUPER novice at PBI - pretty comfortable with Excel. Any help would be much appreciated.

 

Thank you in advance.

Rob

1 ACCEPTED SOLUTION
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous ,

 

For bringing SLADuration in Table1 , use the following dax for Lookup:
Create a new column in Table1:
SLADuration= LOOKUPVALUE(Table2[SLADuration], Table2[SLAType], Table1[SLAType])

 

After this, you can perform your calculation:
Test=

IF(SELECTEDVALUE('Table (1)'[TicketDuration) <SELECTEDVALUE('Table (1)'[SLADuration]), True, False)
 
 
Mark this as a solution if I anwered your question, kudos are always appreciated.
Thanks

View solution in original post

1 REPLY 1
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous ,

 

For bringing SLADuration in Table1 , use the following dax for Lookup:
Create a new column in Table1:
SLADuration= LOOKUPVALUE(Table2[SLADuration], Table2[SLAType], Table1[SLAType])

 

After this, you can perform your calculation:
Test=

IF(SELECTEDVALUE('Table (1)'[TicketDuration) <SELECTEDVALUE('Table (1)'[SLADuration]), True, False)
 
 
Mark this as a solution if I anwered your question, kudos are always appreciated.
Thanks

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.

Top Solution Authors