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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Shelley
Post Prodigy
Post Prodigy

How to create a new dynamic table when LOOKUPVALUE function doesn't work?

I've used the LOOKUPVALUE function a number of times in the same table to create new columns and so I know it works. I have checked and double-checked my nomenclature and it appears to be correct. I'm thinking Power BI may not "like" this function here, because it is referencing the primary key in another table that is already referenced by another field in the current table. That is, two fields in one table both reference the same key field in the second table.

 

So, if this is the case, and it's just some fluke. I'm wondering if I create a separate table will I be able to make this work? (Any other ideas are welcome).

 

How do I create a new dynamic table from my 'Audits' table that contains the following:

* A column for the 'Audits Table'[employeerelatedprocedureID] on which the employee was audited where [employeerelatedprocedureID] <> BLANK().

* A column for the procedure name that must be looked up in the 'Procedures' table, like this: LOOKUPVALUE('Procedures'[PROCEDURES_name], 'Procedures'[Procedure ID], 'Audits'[employeerelatedprocedureid_value])

I'm not sure if this will work either, but I think it's worth a try. If I'm missing something obvious, please let me know. Ideas are appreciated. Thanks!

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee

@Shelley

What is the relationship between audit and procedures? If there's proper one to many relationship, you can get the procedure name with RELATED.

Table =
ADDCOLUMNS (
    FILTER (
        'Audits Table',
        'Audits Table'[employeerelatedprocedureID] <> BLANK ()
    ),
    "pname", RELATED ( Procedures[PROCEDURES_name] )
)

 

Capture.PNG

 

 

If this is not your case, could you post more details, sample data for each table, relationship etc.

View solution in original post

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee

@Shelley

What is the relationship between audit and procedures? If there's proper one to many relationship, you can get the procedure name with RELATED.

Table =
ADDCOLUMNS (
    FILTER (
        'Audits Table',
        'Audits Table'[employeerelatedprocedureID] <> BLANK ()
    ),
    "pname", RELATED ( Procedures[PROCEDURES_name] )
)

 

Capture.PNG

 

 

If this is not your case, could you post more details, sample data for each table, relationship etc.

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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