Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

DATA MODELING

In Power BI, I have two tables with the same columns. Table 1's data comes from the server, and Table 2's data comes from Excel. T1's data is from one month back, and T2's data is from the current month. I tried mapping these tables through a dates table, but it's not accurate. For example, I want to show customer-wise sales, but when I take customers from T1, then T2's sales are not affected. I want both T1 and T2 columns to be the same, with just the sale values coming from different tables.

  • i understand you.

    you can using dax create w caluclated table : 

    DimCustomers = 

    var customers_table_1 = distinct( t1[customer_column])

    var customers_table_2 = distinct( t2[customer_column])

    RETURN

    distinct( 

    union ( customers_table_1   , customers_table_2 ) 

     

    then you link this table to both t1 and t2 table base on the customer field. 

     

    then in your visuals, you read the customer data from the newly created table :  DimCustomers.

     

    will this solve it ? or am i missing something ? 

3 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    i understand you.

    you can using dax create w caluclated table : 

    DimCustomers = 

    var customers_table_1 = distinct( t1[customer_column])

    var customers_table_2 = distinct( t2[customer_column])

    RETURN

    distinct( 

    union ( customers_table_1   , customers_table_2 ) 

     

    then you link this table to both t1 and t2 table base on the customer field. 

     

    then in your visuals, you read the customer data from the newly created table :  DimCustomers.

     

    will this solve it ? or am i missing something ? 

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    Hello,

    if the 2 tables are the same with same columns and same column names, try appending the 2 tables together. this way you will have 1 consolidated table . ( fact table  )

     

    hope this helps.

    let me know if you have any concerns. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Actually i cant because server data is way too big like it takes 2-3hr to refresh. So thats why im trying to find some alternate way to map these.