Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear QV-Designers,
I want to calculate the ratio of the discount per "employee"
therefore i use the expression:
SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} AmoutOfDiscount
These expression works fine.
I want to divide the mentioned expression by the total amount of discount of the store,
but i dont know how to handle this.
Thanks in advance for any help.
so long
daniel
May be like this
SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} AmoutOfDiscount)
/
SUM ( { <TypeOfVoucher={'Store'} , DiscountID = {'Reduction'} >} AmoutOfDiscount)
nope;
this doesn't work
i think, i must add:
total <Store>
somewhere,
but it isn't clear to me where exactly.
i am not sure might be this one
SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} AmoutOfDiscount)
/sum(total <Store>AmoutOfDiscount)
could be this?
SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} AmoutOfDiscount)
/
SUM ( TOTAL { <TypeOfVoucher={'Store'} , DiscountID = {'Reduction'} >} AmoutOfDiscount)
hi,
i just tried the two described solutions shown up, and it didn't work
substitute sum(TOTAL .... with sum( {1}...
Hi,
Try this.
SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} AmoutOfDiscount) /
SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} Total AmoutOfDiscount)
Regards,
Kaushik Solanki
hi,
unforunately the formula still doesn't work right.
but the solution of Kaushik seems to be one step closer to the disered goal.
regards
daniel
Hi,
I think you need to expand the set analysis on the bottom line of the expression Kaushik posted, so that the employee field is ignored and it's able to grab the total for the whole store
SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} AmoutOfDiscount) /
SUM ( { <TypeOfVoucher={'Sale'} ,[your empoyee field here] =, DiscountID = {'Reduction'} >} Total AmoutOfDiscount)
as at present I think it is just grabbing the total for the empoyee
hope that helps
thanks
Joe