Forum Discussion
zeckert
9 years agoHelper I
Need to sum based on unique values
I have a Purchase order report that i need to be able to group by vendor but there is multiple rows for one PO due to line items. There is a column that has the final amount but I keep getting it co...
zeckert
9 years agoHelper I
So the desired look i would want is listed below Vendor1 627.91 Vendor2 150.39 The order amount will always be the same because that is the final amount of the purchase order however there is multiple rows to account for each item in order. So it will read 583 at least once for the main line but read at least one other line for the item in the order. I need to be able to take the amount one time based on the PO # and sum all orders under vendor1 then same for vendor2 and so on
- Vvelarde9 years agoCommunity Champion
Hi,
Try with this Measure:
TotalOrderAmount = SUMX(DISTINCT(Table1[PO#]),CALCULATE(AVERAGE(Table1[Order Amount])))
Regars
Victor
Lima - Peru
- Mosa7 years agoNew Member
Hi.
Thanks for your help. I have a question with the same context. Now, when I unpivot comlumns, data is repeated. So, I want to sum the number of values in one column, but it appreas as doubled
- zeckert9 years agoHelper I
Thank you so much. It worked perfect.
- Anonymous7 years agoNot applicable
Hi Vvelarde,
The Measure "TotalOrderAmount = SUMX(DISTINCT(Table1[PO#]),CALCULATE(AVERAGE(Table1[Order Amount])))" works perfectly but I can not seem to wrap my head around how it works. Could you provide an explaintation?
Thanks