Forum Discussion

KarimMouloua's avatar
KarimMouloua
Regular Visitor
4 years ago
Solved

DAX virtual summarized table

Hi All,

Please, if any one can help it will be much appreciated. I have the following summarized table to calculate the over all yield, and i cannot see where my mistake is? I get the error at the bottom of the code:  "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value"

 

here is the code for the measure:

OverAllYield1 =
SUMMARIZE
(
'ABU_Yield-Qty_Data1',
'ABU_Yield-Qty_Data1'[DIE_TYPE],
'ABU_Yield-Qty_Data1'[FT_PRODUCT],
'ABU_Yield-Qty_Data1'[Test Insertion],
'ABU_Yield-Qty_Data1'[Test Flow],
'ABU_Yield-Qty_Data1'[Insertion Temp],
"FT Final Pass Over All Yield Avg1",
CALCULATE
(
AVERAGE
(
'ABU_Yield-Qty_Data1'[Yield (%)]
),
'ABU_Yield-Qty_Data1'[Test Flow]="FT",
'ABU_Yield-Qty_Data1'[Test Insertion]="Final Insertion"

)
)

 

 

6 Replies

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

    The problem is that the code returns a table of values (SUMMARIZE returns a table). You can try:

    OverAllYield1 =
    AVERAGEX (
        ADDCOLUMNS (
            SUMMARIZE (
                'ABU_Yield-Qty_Data1',
                'ABU_Yield-Qty_Data1'[DIE_TYPE],
                'ABU_Yield-Qty_Data1'[FT_PRODUCT],
                'ABU_Yield-Qty_Data1'[Test Insertion],
                'ABU_Yield-Qty_Data1'[Test Flow],
                'ABU_Yield-Qty_Data1'[Insertion Temp]
            ),
            "FT Final Pass Over All Yield Avg1",
                CALCULATE (
                    AVERAGE ( 'ABU_Yield-Qty_Data1'[Yield (%)] ),
                    'ABU_Yield-Qty_Data1'[Test Flow] = "FT",
                    'ABU_Yield-Qty_Data1'[Test Insertion] = "Final Insertion"
                )
        ),
        [FT Final Pass Over All Yield Avg1]
    )
    
    • KarimMouloua's avatar
      KarimMouloua
      Regular Visitor

      Hi Paul,

       

      thanks for the quick response, however, the i am still not able to get the correct yield average by grouping the data based on die type/FT product/Test insertion/test flow and insertion temp. Do you mind providing feedback on the logic of my measure? I am probably doing it wrong. 

       

      Thanks for your help

      Karim

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

        It would be more productive if you provided sample data and a depiction of the expected outcome. Otherwise we are basically guessing!