Forum Discussion
Create a link table between 2 tables
I have a Facts table which comes from several dimension table and it looks like this table 1:
Then i got another table table 2:
and i want to create a table
which should have all the data from table 2 but only the SUM OF sales val of table 1 and it should be the aggregate of the rows from table 1 which should match with particular rows of table 2(row 1) and like wise.
what's the best approach ?
3 Replies
- amitchandakSuper User
Anonymous , not very clear. You have merge, where after merge, you can aggregate the column from one table
https://radacad.com/append-vs-merge-in-power-bi-and-power-query
DAX-https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/
- AnonymousNot applicable
I want a column sales val in table 2 which is the aggregate of table 1 but there's a matching condition.
All the columns of table 2(except val column) should match with the table 1 if the condition satisfies then aggregate and add the value in table 2
- AnonymousNot applicable
amitchandak
This is my new thread https://community.powerbi.com/t5/Desktop/Compare-columns-from-2-tables-and-get-aggregate-values/td-p/1646577
either you can reply here or in my new thread. thanks for the timeI have 2 tables ,
Table 1: my raw data table (Fact Table) It has multiple rows because of the multiple sales value
Table 2 : My forecast table which predicts the price for a particular month and It has unique rows
I want to compare the columns , Country,State,Department,Description,Month in both table 1 and 2 and get the sum value of table 1 and put it in the table 2 "Sales val".This is how the resultant table 2 should look after the transformation.
Thank you for your time