Forum Discussion
watje255_ju
Helper III
4 years agoDiscount Allocation
Hello, I want to calculate the sales revenue generate from each product, but the total discount is a line item. Does anyone know how I could allocate the total discount to each item? The discoun...
- 4 years ago
Hi watje255_ju ,
You can try using the below measure for Discount calculation -
Discount =VAR DiscountAmount = calculate ([Sales Amount],ALLEXCEPT(Discount,Discount[Sales Order Number]),Discount[Product Code]= "Discount" )VAR SalesAmount = calculate ([Sales Amount], ALLEXCEPT(Discount,Discount[Sales Order Number]),Discount[Product Code]<> "Discount" )Return DIVIDE(discountAmount,SalesAmount,0)Hope this helps!Please accept the solution if this answers your query.Thanks!Avantika
Avantika-Thakur
Solution Supplier
4 years agoHi watje255_ju ,
You can try using the below measure for Discount calculation -
Discount =
VAR DiscountAmount = calculate ([Sales Amount],
ALLEXCEPT(Discount,Discount[Sales Order Number]),Discount[Product Code]= "Discount" )
VAR SalesAmount = calculate ([Sales Amount], ALLEXCEPT(Discount,Discount[Sales Order Number]),Discount[Product Code]<> "Discount" )
Return DIVIDE(discountAmount,SalesAmount,0)
Hope this helps!
Please accept the solution if this answers your query.
Thanks!
Avantika