Forum Discussion
SumProduct with Power BI
- 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.
Hi Sandeep_PowerBI I organized your table as shown on first picture below, new calculate column
and created 3 Measures below. On last picture there are results. I hope this help.
My Excel from your data
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_PowerBI3 years agoFrequent Visitor