Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I Have a Total DIscount Amount 500, And I Sale Three Item.
1.Item 1 Price - 2000.00
2.Item 2 Price - 1500.00
3.Item 3 Price - 2500.00
How To Calculate The Discount Amount Itemwise.
Result Should Be Like This:
1.Item 1 Price - 2000.00 Discount - 166.67
2.Item 2 Price - 1500.00 Discount - 125.00
3.Item 3 Price - 2500.00 Discount - 208.33
1.Item 1 Price - 2000.00 Discount - 166.67 = 500*2000/(2000+1500+2500)
2.Item 2 Price - 1500.00 Discount - 125.00 = 500*1500/(2000+1500+2500)
3.Item 3 Price - 2500.00 Discount - 208.33 = 500*2500/(2000+1500+2500)
=TotalDiscount * Price / Sum (total Price)
1.Item 1 Price - 2000.00 Discount - 166.67 = 500*2000/(2000+1500+2500)
2.Item 2 Price - 1500.00 Discount - 125.00 = 500*1500/(2000+1500+2500)
3.Item 3 Price - 2500.00 Discount - 208.33 = 500*2500/(2000+1500+2500)
=TotalDiscount * Price / Sum (total Price)
hi
please find attachement.
in script--
LOAD * INLINE [
sl, item, price
1, item1, 2000
2, item2, 1500
3, item3, 2500
];
then take pivot chart--
dimension--- sl and item
expressions--- (1) only(price)
(2) (price*500)/Sum(TOTAL(price))
then output show like this--
sl | item | price | discount |
1 | item1 | 2000 | 166.67 |
2 | item2 | 1500 | 125.00 |
3 | item3 | 2500 | 208.33 |