Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Combine - Two Calcualate tables into one Table

Hi Experts

 

how could i modify the following DAX to combine the two seperate Calculated Tables into one master table

 

Sub 1 = Calculatedtable = ('tablemaster,'tablemaster[Combined_Mole]="Salbut",Device_Type[Type]="MDI")

 

Sub 2 = Calculatedtable = ('tablemaster,'tablemaster[Combined_Mole]="Salbut",Device_Type[Type]="DPI")

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Sub 1 = Calculatedtable = ('tablemaster,'tablemaster[Combined_Mole]="Salbut",Device_Type[Type]="MDI || Device_Type[Type]="DPI)

5 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Icon for Community Champion rankCommunity Champion

    Is there a reason you need actual physical tables?

    can you provide sample data or PBIX file and explain what you need to compute?

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Paul - currently the two calculatetables are giving me two seperate table one showing MDI info and the other showinf DPI info....the columns in both table are the same less the device type. i just want one table to show both MDI & DPI in one calculated table...

    • Anonymous's avatar
      Anonymous
      Not applicable

      Would the following work: 
      Sub 1 = Calculatedtable = ('tablemaster,'tablemaster[Combined_Mole]="Salbut",Device_Type[Type]="MDI && Device_Type[Type]="DPI)

      • PaulDBrown's avatar
        PaulDBrown
        Icon for Community Champion rankCommunity Champion

        You can try:

        New Table = 

        VAR Sub 1 = Calculatedtable = ('tablemaster,'tablemaster[Combined_Mole]="Salbut",Device_Type[Type]="MDI")

         

        VAR Sub 2 = Calculatedtable = ('tablemaster,'tablemaster[Combined_Mole]="Salbut",Device_Type[Type]="DPI")

        RETURN
        UNION(Sub 1, Sub 2)