Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Set analysis - bar chart of difference between mont stock

Hi,

I have table which has stock values per month and I want to get bar chart which displays difference in stock value versus last month (as shown below)

TABLE:

Month          StockValue

201205          100

201206          120

201207          80

201208          90

I want display if for example months 201205-201207 are selected

0                    +20                    -40

201205          201206               201207

How can I get this done? I can't get it to calculate the expression correctly.

For example if I try:

sum({$}StoValue)- Sum({$<Month = {201207}>} StoValue)

and month 201208 is selected it will give me two bars:

the first for 201207 and it is exactly the same as in 201207 but negative

the second bar is just exactly the same as in 201208

It can be also that it shows only last 3 month's differences and not depending on the current month selection.

BR,

Maarit

1 Solution

Accepted Solutions
MVP
MVP

Re: Set analysis - bar chart of difference between mont stock

Try using chart inter record functions like above() / before() instead.

Create a bar chart with dimension Month, create an expression:

=sum(StockValue) - above(sum(StockValue))

if you want to set the month range, use a set expression in both sum functions, like {<Month = {"<201208"}>}

Hope this helps,

Stefan

1 Reply
MVP
MVP

Re: Set analysis - bar chart of difference between mont stock

Try using chart inter record functions like above() / before() instead.

Create a bar chart with dimension Month, create an expression:

=sum(StockValue) - above(sum(StockValue))

if you want to set the month range, use a set expression in both sum functions, like {<Month = {"<201208"}>}

Hope this helps,

Stefan

Community Browser