Forum Discussion
How to calculate weighted average between two measures?
- 4 years ago
Hi lulcasl ,
Please try the following formula, on my computer, it takes only about 2 seconds to calculate the result.
Measure = IF ( HASONEVALUE ( d_Tipos[Tipo] ), [Produtividade Calculada SAP], SUMX ( ALLSELECTED ( d_Tipos[Tipo] ), [Produtividade Calculada SAP] * [Volume Realizado] ) / [Volume Realizado] )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lulcasl , try a new measure like
Divide(sumx(Table,[ProdCal]*[Volume realizado]), Sum(Table[Volume realizado]) )
Hello amitchandak
It worked, but now the measure is pretty much unusable, it's taking around 3 - 5 minutes to load cards and matrixes with the said measure.
Anything I can do to avoid this?
- v-kkf-msft4 years ago
Community Support
Hi lulcasl ,
Please try the following formula, on my computer, it takes only about 2 seconds to calculate the result.
Measure = IF ( HASONEVALUE ( d_Tipos[Tipo] ), [Produtividade Calculada SAP], SUMX ( ALLSELECTED ( d_Tipos[Tipo] ), [Produtividade Calculada SAP] * [Volume Realizado] ) / [Volume Realizado] )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.