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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
mcastro70
Frequent Visitor

DAX Help on creating a calculated column or mesure that will bring a value from another table

Hi;

 

just to put it out there right away. I am a basic PBI user, reason why I am asking for help on this solution which for most people is problably really easy.

 

Here is what I need:

 

I have to tables, "Main_Table" and "Secondary_Table". The tables have related fields ([Asset Type] and [Company]). What I need is bring a value to from the second table into the first table [(Useful Life (Y)] making sure to compare the tables by "asset type" and "company" so that the values from "useful life (y) are specific for each company just like the table defines it. See images below:

 

mcastro70_0-1638909991838.png

 

This is the second table (excel version) that defines the useful life for of the diff asset types; which they are not the same for all companies as you can see.

mcastro70_1-1638910030491.png

 

and this is that same table Unpivoted in PowerQuery (I just changed the company names for security reasons):

mcastro70_2-1638910061779.png

 

I was thinking that maybe LOOKUPVALUE might work but still do not know how to create such code.

 

Thanks in advance for all the help.

 

Mcastro

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please try something like below.

It is for creating a new column.

 

Picture1.png

 

Useful Life (Y) CC =
CALCULATETABLE (
VALUES ( Security_Bridge_CompanyName[Useful Life(Y)] ),
FILTER (
Security_Bridge_CompanyName,
Security_Bridge_CompanyName[Company name] = Account_Final_Report[Company]
&& Security_Bridge_CompanyName[Asset Type] = Account_Final_Report[Asset Type]
)
)


 

    Microsoft MVP




If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.





LinkedIn
Visit my LinkedIn page





Outlook Booking
Schedule a short Teams meeting to discuss your question.




View solution in original post

5 REPLIES 5
Balaraju
Helper III
Helper III

Balaraju_1-1638973301204.png

Hi,

Above chart showing program wise target temperature I need to show most used target temperature by particular program.

For example: 01BE - 150 is most used  target temperature like we are seeing in count of target temperature.

I want solution on that.

 

 

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please try something like below.

It is for creating a new column.

 

Picture1.png

 

Useful Life (Y) CC =
CALCULATETABLE (
VALUES ( Security_Bridge_CompanyName[Useful Life(Y)] ),
FILTER (
Security_Bridge_CompanyName,
Security_Bridge_CompanyName[Company name] = Account_Final_Report[Company]
&& Security_Bridge_CompanyName[Asset Type] = Account_Final_Report[Asset Type]
)
)


 

    Microsoft MVP




If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.





LinkedIn
Visit my LinkedIn page





Outlook Booking
Schedule a short Teams meeting to discuss your question.




Hi Kim;

 

You did understand my issue perfectly even though I was not that good at explaning it.

 

Your solution worked perfectly! This is awesome!!!

 

Thanks so much!

 

Mcastro.

bcdobbs
Community Champion
Community Champion

In power query you can click Merge tables and join them both on the two columns. You should then end up with a single table with all your data.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Hi bcdobbs;

 

Yes! I had already thought about that but it was actually not an option since the "asset type" column is not available in the Account Fina Report Table. The "Asset Type" is also a CC within PBI hence not available in PQ.

 

But thanks for the reply!

 

Mcastro

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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