Forum Discussion

nannimora's avatar
nannimora
Helper I
3 years ago
Solved

Weighted Average

Hello, 

I need to solve my problem. 

 

I have this table:

ArticoloDettaglio DocVendutoCostoMargineMargine %Quantità €/UM Costo/UMMarg Unit
20290FF - 547 - 30/01/2023€ 182,54€ 129,07€ 53,4729,29%30,73    5,94 €€ 4,20€ 1,74
20290FF - 486 - 30/01/2023€ 152,84€ 108,07€ 44,7729,29%25,73    5,94 €€ 4,20€ 1,74
20290FC - 453 - 27/01/2023-€ 293,32-€ 199,15-€ 94,1732,11%-51,46    5,70 €€ 3,87€ 1,83
TOTAL € 42,05€ 37,98€ 4,079,68 %5,00€ 8,41€ 7,60 

 

The Measures Are:

 

€/UM = 
IFERROR(
    [Venduto]/[Quantità],
    0
)

Costo / UM = 
IFERROR(
    [Costo]/[Quantità],
    0
)

 

 

The toal result of these measure is wrong. Because I'd like to have the weighted average of the specific values ( Es. € 5,94 , € 5,94, € 5,70).

 

Thanks

 

1 Reply