Forum Discussion
tradeexllc
6 years agoFrequent Visitor
Incorrect totals when using % calculations with quantity and filters
Hello, I am trying to calculate PY Sales variance and each time I bring in the calculation for PY the totals do not add up. Here are all my formulas in order: QTY PY = IF ( ISCROSSFILTER...
amitchandak
6 years agoSuper User
Multiplication should happen at line level or some group level.
So we we do Sum(A*B) Not sum(a)* sum(b)
Do do this is to take a row context
sumx(summarize(table,table[Date],"_sum",sum(Sheet1[QTY SOLD]),"_dis",[PY Discount %]),[_sum]*[_dis])
table[date] is the row context where calculation need to done, it can be id or month as per need