Forum Discussion
Jamey
Helper I
5 years agoHow to SUM an AVERAGE Column
I have a table that can contain multiple entries with header information for the same Invoice - see example: Customer | Invoice No | Sales | Production Order | Cost Qty XYZ Inc 12345601 ...
- 5 years ago
Sorry, I missed a context transition in my reply, try it like this.
SUMX Average CALCULATE = SUMX ( VALUES ( 'Table'[INVOICE_ITEM] ), CALCULATE ( AVERAGE ( 'Table'[GROSS_SALES] ) ) )I believe that is the value you are looking for yes?
Jihwan_Kim
Super User
5 years agoHi, Jamey
I am still quite not sure whether I understood your question correctly, but please check the below picture and the sample pbix file's link down below.
My previous measure (Sales Fix) did not work, however, Sales Fix V2 is working.... I think.. Please check.
Sales Fix V2 =
SUMX( VALUES('RawData'[INVOICE_ITEM]), [Sales Fix])
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Jamey
Helper I
5 years agoThank you Jihwan Kim!
This solution works but because it's a two step solution by using another Measure, I Accepted the other solution - thanks again!