Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Problem with "Total"

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

11 Replies
chauhans85
Esteemed Contributor

Problem with "Total"

May be like this

SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} AmoutOfDiscount)

/

SUM ( { <TypeOfVoucher={'Store'} , DiscountID = {'Reduction'} >} AmoutOfDiscount)

Not applicable

Re: Problem with "Total"

nope;

this doesn't work

i think, i must add:

total <Store>

somewhere,

but it isn't clear to me where exactly.

chauhans85
Esteemed Contributor

Problem with "Total"

i am not sure might be this one

SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} AmoutOfDiscount)

/sum(total <Store>AmoutOfDiscount)

Not applicable

Problem with "Total"

could be this?

SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} AmoutOfDiscount)

/

SUM ( TOTAL { <TypeOfVoucher={'Store'} , DiscountID = {'Reduction'} >} AmoutOfDiscount)

Not applicable

Problem with "Total"

hi,

i just tried the two described solutions shown up, and it didn't work

alfasierra
Contributor II

Problem with "Total"

substitute sum(TOTAL ....   with    sum( {1}...

Problem with "Total"

Hi,

    Try this.

   

    SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} AmoutOfDiscount) /

    SUM ( { <TypeOfVoucher={'Sale'} , DiscountID = {'Reduction'} >} Total AmoutOfDiscount)

Regards,

Kaushik Solanki

Not applicable

Problem with "Total"

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

Not applicable

Problem with "Total"

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

Community Browser