Forum Discussion
Lookup value from table_2 and sum it [DAX]
- 5 years ago
Hi, Anonymous
You need to create a summarize table first (calcualted table)
Tab = SUMMARIZE(Table1,Table1[Name No],Table1[Name],"Cost",SUM(Table1[Costs]))Tehn using lookupvalue to create a calculated column.
C_Costs = LOOKUPVALUE(Tab[Cost],Tab[Name No],Table2[Name No],Tab[Name],Table2[Name])Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous you should create a table for name dimension with unique values for the name and set relationship with both the tables, it will be one to many relationships, in visual, use name information from this new table and rest of the columns from the respective table. This is the right way to do this. Read this post
Understand star schema and the importance for Power BI - Power BI | Microsoft Docs
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡