Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
hopkinsc
Valued Contributor II

Help writing expression

Hi all,

I am trying to write an expression to give me WASTE as a % of SALES.

The calculation is:

StockValue / SalesValue

but i need it to exclude any selections made from the field [Stock Reason], so this is what i have so far which seems to work

Sum(StockValue)/Sum({$<[Stock Reason] = >}SalesValue)

But i also need to exclude any sales from DEPT = U .

This is where i am having problems, can anyone help me to write the expression to do all of the above?

so..

StockValue needs to be divided by SalesValue excluding Dept U and ignoring selections from StockReason

Any help woulf be appreciated..

Thanks

1 Solution

Accepted Solutions
Not applicable

Help writing expression

Hi

try this :

Sum(StockValue)/Sum({$<[Stock Reason]=, DEPT-={'U'}>}SalesValue)

Regards

Gills

2 Replies
Not applicable

Help writing expression

Hi

try this :

Sum(StockValue)/Sum({$<[Stock Reason]=, DEPT-={'U'}>}SalesValue)

Regards

Gills

hopkinsc
Valued Contributor II

Help writing expression

Thanks very much Gills..

Community Browser