Forum Discussion
Measurement with data from different tables
Hello. I have similar data from two different tables. I want to make a sum measurement with the column data from both tables. How would I do this?
3 Replies
- parry2kSuper User
314mp_M0th4 what you need is a dimension table that has a relationship with these two tables and then you can visualize and bring the sum from both tables. Let's say both tables have a common column called Product, you will create a table with the unique value of the Product column, set a relationship with this new table on the product column with each of the tables, and in any visual, you will bring the product from this new table and sum from the transaction tables, and that will do it.
👉 Learn Power BI and Fabric - subscribe to our YT channel - @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤️
- 314mp_M0th4Resolver I
Thanks, I could do that, but there is a trouble. One of these tables is a cost plan table, and the other is an actual cost table. The cost plan table can have several different cost plans for each project but there is only one actual cost. I want to have a matrix where you choose which plans you would like to see for a given project but the actual cost remains on a single column in the matrix. Currently this is my matrix with the plans where the plans are a single measure and then the types is the column filter :
Where KÁ-0 and KÁ-2 are the cost plan types. However, with another measure for actual cost I get this matrix:
Where the actual cost column appears for each plan but I want it to appear only once at the right hand side.
- parry2kSuper User
314mp_M0th4 if I understood it correctly, the project is the common column in both the tables, create a project table, link it with the actual and plan table, and then you will have a slicer for the plan, which plan do you want to see, it will filter plan table but the actual cost will remain the same.
It all boils down to data modeling and how your tables are structured.
👉 Learn Power BI and Fabric - subscribe to our YT channel - @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤️