Forum Discussion
Summing on multiple rows
- 4 years ago
chenko90 , This only need when Price Variance is measure
SUMX(summarize(Table, Table[Product], Table[customer]), "_1", Table[Price Variance]), [_1])
when price variance is a column
SUMX(summarize(Table, Table[Product], Table[customer], Table[Price Variance]), [Price Variance])
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Hi,
Typically a simple SUM should work in these kinds of cases, but I assume there is some issue with using it. Try adding DISTINCT before your VALUES so something like this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Here is a visual of what im working with. As you can see the total for customer A is wrong. The sku level numbers are correct. When i use the SUM formula it has the same issue where it runs the formula in the measure instead of summing the sku level numbers.
- amitchandak4 years agoSuper User
chenko90 , This only need when Price Variance is measure
SUMX(summarize(Table, Table[Product], Table[customer]), "_1", Table[Price Variance]), [_1])
when price variance is a column
SUMX(summarize(Table, Table[Product], Table[customer], Table[Price Variance]), [Price Variance])
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.- chenko904 years agoFrequent Visitor
What does the "_1" mean?