Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all
I need a dax that calculate average cost, I have the following columns where my column index is "UltimaCambio" and This is what it looks like:
I calculated last row with following formula beacuse the average cost is calculated:
Average Cost = Total Cost / Number of Units Produced
and my total cost is calculated multiplicate my last accumulated cost * accumulated cant
and I use the following dax for calculate the last row:
I have this excel with the columns calculated and this is example how it has to be seen:
Hi @Efren2000
If I understand you correctly, you want to calculate the average cost. Do you need to calculate the average of the column Costo x Tipo de Cambio? So in your example data, the average is 46.65, is that correct?
Since you gave two screenshots, but some of the column names seem to be different in both screenshots, I'm a bit confused and need to check with you. Is the second screenshot your expected result?
Do Cantidad Mov., COSTO CALCULADO and Acumulado Cantidad in Figure 2 correspond to Movimientos, Costo x Tipo de Cambio and Saldo Final in Figure 1 respectively?
It would be great if you could explain your needs in more detail. Thanks.
Best Regards,
Yulia Xu
Thak you for respond
I need a dax where it is calculated Average Cost = Total Cost (Total Valor Inv) / Number of Units Produced (Accumulated Amount)
Row A4: In PBI, we already calculte this values from previous month
Row A5: Actual Value =E5*L4
Accumulated Amount: We already have the measure
Acumulated Value: =H4*L4
Total Valor Inv =G5+I5
Cost calculate= J5/H5
Row A6: Actual Value =E6*L5
Accumulated Amount: We already have the measure
Acumulated Value: =H5*L5
Total Valor Inv =G6+I6
Cost calculate= J6/H6
Row A10: Actual Value =E10*F10
Accumulated Amount: We already have the measure
Acumulated Value: =H9*L9
Total Valor Inv =G10+I10
Cost calculate= J10/H10
Row A11 Same as Row A6…
This is what I have in PBI
Best Reguards
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
15 | |
7 | |
6 |