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,
Thanks for response,
Actually separating in 3 columns is fine. Done in Transaformation unpivot. but, the same calculation is not matching to my requiremet. I want to calculate weighted Average value using DAX...
=SUMPRODUCT(D2:O2,D5:O5)/SUM(D2:O2) - using Excel
=SUMPRODUCT(HMP(D2:O2), ABC(D5:O5))/SUM(HMP(D2:O2))
Thanks,
Sandeep
Hi Sandeep_PowerBI if possible provide data not as picture so I can use it for testing measure to get your expected output
- Sandeep_PowerBI3 years agoFrequent Visitor
How to attach excel sheet?
- some_bih3 years ago
Community Champion
Hi Sandeep_PowerBI check part example from link, ot cpuld be in web page values