Forum Discussion
KarimMouloua
4 years agoRegular Visitor
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 b...
- 4 years ago
See if this works for you:
% Yield Val = AVERAGE('Table'[% Yield])Overall Yield = AVERAGEX ( SUMMARIZE ( 'Table', 'Dim Die'[DIE_TYPE], 'Dim Flow'[D flow], 'Dim Ft Product'[FT_PRODUCT], 'Dim Insertion'[D Insertion], 'Dim Lot'[LOTNO], 'Table'[Insertion Temp] ), [% Yield Val] )Yield By Lot = VAR Lot = MAX ( 'Dim Lot'[LOTNO] ) RETURN IF ( ISBLANK ( [% Yield Val] ), BLANK (), AVERAGEX ( FILTER ( ALL ( 'Table' ), RELATED ( 'Dim Lot'[LOTNO] ) = LOT ), [% Yield Val] ) )Yield Change = [Overall Yield] - [Yield By Lot]I've attached the sample BPBIX file
- 4 years ago
Hi Paul,
I was out for a few days, i tried your code yesterday, and it works.
Thank you very much
Regadrs,
Karim
PaulDBrown
Community Champion
4 years agoThe 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
4 years agoRegular 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