Forum Discussion

randyvik's avatar
randyvik
New Member
6 years ago
Solved

Merge vittual tables

Hello All,   I have 2 virtual table variables in the following DAX code: table1 and table2. But I dont know how to merge virtually   Dummy = var table0 = SELECTCOLUMNS(FILTER('Master table','Mast...
  • Greg_Deckler's avatar
    Greg_Deckler
    6 years ago

    randyvik This however works:

     

    Table 4 = 
        VAR __Table2 = { (1,"A","Black"),(2,"B","White"),(3,"C","Blue")}
        VAR __Table3 = { (1,"A","One"),(2,"B","Two"),(3,"C","Three")}
        VAR A = SELECTCOLUMNS(__Table2,"Key",[Value1],"Color",[Value3])
        VAR B = SELECTCOLUMNS(__Table3,"Key",[Value1],"Number",[Value3])
    RETURN
        NATURALINNERJOIN(A, B)

    marcorusso Help! See the Master tables in the attached PBIX. As well as Table 2 and Table 3 and Table 5 (error)