Forum Discussion

SBC's avatar
SBC
Helper III
2 years ago
Solved

Data Integration Challenge: Integrating Data from Table1, Table2, Table3 into Table4 Page& Reshaping

Hi, I have data from table1, table2, table3 each with different data sources. Within this dataset, measures such as (0-1), (02-05), (06-11), (12-24), and 24+ are derived through distinct calculatio...
  • tharunkumarRTK's avatar
    2 years ago

    SBC ,

     

    Assuming 

    1. CoreCurveCD, FACTORNAME, and RISK are columns in three tables Table1, Table2 and Table3

    2. (0-1), (02-05), (06-11), (12-24), and 24+ different measures in each table.

     

    To combine all three, you can follow this dax pattern

    union(
    
    
    addcolumns(
    selectcolumns (Table1, “RISKJOINT”, Table1[CoreCurveCD]  ) , 
    “(0-1)”,   [(0-1)],
    “(02-05)”, [(02-05)],
    “(06-11)”, [(06-11)],
    “(12-24)”, [(12-24)],
    “24+”, [24+]
    ),
    
    addcolumns(
    selectcolumns (Table2, “RISKJOINT”, Table2[FACTORNAME]  ) , 
    “(0-1)”,   [(0-1)],
    “(02-05)”, [(02-05)],
    “(06-11)”, [(06-11)],
    “(12-24)”, [(12-24)],
    “24+”, [24+]
    ),
    
    
    addcolumns(
    selectcolumns (Table3, “RISKJOINT”, Table3[RISK]  ) , 
    “(0-1)”,   [(0-1)],
    “(02-05)”, [(02-05)],
    “(06-11)”, [(06-11)],
    “(12-24)”, [(12-24)],
    “24+”, [24+]
    ),
    
    )

     I believe the logic of 4 measures for each table are different, in that case please make changes in the above code.

     

    PS: calculated tables could degrade your sematic model performance.

     


    If the post helps please give a thumbs up


    If it solves your issue, please accept it as the solution to help the other members find it more quickly.


    Tharun