Forum Discussion
Sandeep_PowerBI
3 years agoFrequent Visitor
SumProduct with Power BI
Hi Team, Please help me with SUMPRODUCT similar with excel in DAX measure... Below are my Actuals in Main Category and Lines. How to get weighted average using SUMPRODUCT logic in DAX command? I...
- Anonymous3 years ago
Hi Sandeep_PowerBI ,
In Power BI, you need to use unpivot and pivot for your data first, and then you can perform calculations.
After transformation, the data is as follows.
Create this measure:
Measure = VAR _table = SUMMARIZE ( 'Table', [Line], [ABC], [HMP], "Product", SUM ( 'Table'[ABC] ) * SUM ( 'Table'[HMP] ) ) RETURN DIVIDE ( SUMX ( _table, [Product] ), SUMX ( FILTER ( ALL ( 'Table' ), [Line] = MAX ( 'Table'[Line] ) ), [HMP] ) )Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sandeep_PowerBI
3 years agoFrequent Visitor
Hi some_bih
Thanks for providing solution but in my data, I dont have weight value columns f... Only 2 categories HMP and ABC values...
How did you calc weight (column F)
Sandeep_PowerBI
3 years agoFrequent Visitor