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
lvdnest3866
Regular Visitor

Lookup Rate Code in RateTable and return the Amount for that Ratecode to the Fact Table.

RelationshipsRelationships

Hi there,

 

Please help. I have the Fact table (PRMSTable) and the lookup

table (Rate code extract).

 

In the PRMStable I have 4 different columns each with their own Rate codes.

PRMSTablePRMSTable

RateTableRateTable

I want to create 4 additional columns in the PRMSTable with the following column names:

Column 1: LabourHrs. The LabourHrs column should show the  Base amount from the Rate Table column RateCode that it gets from the Base Standard labor time rate code column in the PRMSTable.

 

Column 2: MachineHrs column should use the Base standard machine time rate code in PRMSTable and Rate Code from Rate Table and return the Base Amount.

 

Column 3: Indirect Labour Rate column should use the Base standard burden 1 rate code in PRMSTable and Rate Code from Rate Table and return the Base Amount.

 

Column 4: OverheadRate column should use the Base standard burden 3 rate code in PRMSTable and Rate Code from Rate Table and return the Base Amount.

Add each Base Amount against each Product NumberAdd each Base Amount against each Product Number

 

 

 

 

 

At the moment when I drag the Base Amount into the Pivot Table Row area every single Base Amount from the RateTable shows against duplicates of Product Number. 

 

4 left columns what I want to see, 4 right columns what rates to use4 left columns what I want to see, 4 right columns what rates to use 

I am not sure how to do the lookup and if I should go and create each of the 4 columns in the PRMSTable and then write the function for each of the columns.

 

Any assistance would be greatly appreciated.

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @lvdnest3866

 

There is a little complex for your case.

 

Based on your title, it seems that you're confused of using lookupvalue  function.

 

You could have a view of this video which introduce the scenarios about LookupValue.

 

If you need further, please share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

 

I would appreciate it if you could show your final desired output.

 

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.

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @lvdnest3866

 

There is a little complex for your case.

 

Based on your title, it seems that you're confused of using lookupvalue  function.

 

You could have a view of this video which introduce the scenarios about LookupValue.

 

If you need further, please share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

 

I would appreciate it if you could show your final desired output.

 

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.

Hello Cherry.

 

Thank you so much. That was exactly what i needed. It was very easy to do.

I just did not know the DAX function to use, but now i will abuse it. 

 

I will upload my results soon.

 

Regards.

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.