Forum Discussion
sgsukumaran
7 years agoResolver II
Sum based on Distinct values on another Column
I am trying to ratio based on sum(unique values on a column)/ Count(Values on Column) Warehouse Processing %:= DIVIDE ( CALCULATE ( SUM ( [Warehouse Processing Offset] ), 'Orders'[DC Ready...
- 7 years ago
The calculations did not work and I ended up creating a calculated table with distinct values to achieve.
v-lili6-msft
7 years agoCommunity Support
hi,@sgsukumaran
After my research, you need use ALLEXCEPT Function in your function like below:
Warehouse Processing % =
DIVIDE (
CALCULATE (
SUM ( [Warehouse Processing Offset] ),
'Orders'[DC Ready To Ship Date] <> BLANK ()
),
CALCULATE (
DISTINCTCOUNT ( Orders[Pick Ticket Control Number] ),ALLEXCEPT(Orders,Orders[Order Number]),
'Orders'[DC Ready To Ship Date] <> BLANK ()
),
0
)Result:
Best Regards,
Lin
sgsukumaran
7 years agoResolver II