Forum Discussion
Dividing rows/measures
JNelson , You should not use measure in calculated column you should create a measure
divide([Qty Meausre], Sum(Table[Cost])
Line level measure
Sumx(Table, Divide([Qty Measure], [Cost])
or
AverageX(Table, Divide([Qty Measure], [Cost])
- JNelson4 years ago
Helper II
Thank you amitchandak .
So it is not possible to get the unit rates against each item? I've tried each dax you provided and they're not working. Could it be because the Cost and Quantity measures are in different tables? The SUMX formula just yields blank entries in the table.
Thanks
- amitchandak4 years ago
Super User
JNelson , Not if cost and QTY are from the different tables we should try to have a new column,
refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8or use summarize of values in the measure
Assume there is a common table item
Divide(sumx(summarize('Item', "_1", calculate(Sum(Table1[Cost]) * Sum(Table2[Qty]) ) ),[_1]),Sum(Table2[Qty]) )