Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Want Ratio of one column to another in a chart. (One column is full accumulation)

Hi Community,

I have an issue trying to calculate a ratio between 2 expressions.  I've tried using something like cloumn(1)/column(2) and combining the two separate expressions into one.  Neither of these give me what I want as one of the expressions needs full accululation to give the value I want. 

Is there away to work around this or a solution?

Regards,

Brandon

1 Solution

Accepted Solutions
MVP
MVP

Re: Want Ratio of one column to another in a chart. (One column is full accumulation)

I believe using column() will not regard the full accumululation option, instead it will access the not accumulated value.

Instead of using full accumulation option, you could try replacing your expression with something like

=rangesum(above(YOUREXPRESSION,0,rowno() ))

e.g.

=rangesum(above(sum(Sales),0,rowno() ))

4 Replies
MVP
MVP

Re: Want Ratio of one column to another in a chart. (One column is full accumulation)

I believe using column() will not regard the full accumululation option, instead it will access the not accumulated value.

Instead of using full accumulation option, you could try replacing your expression with something like

=rangesum(above(YOUREXPRESSION,0,rowno() ))

e.g.

=rangesum(above(sum(Sales),0,rowno() ))

Not applicable

Re: Want Ratio of one column to another in a chart. (One column is full accumulation)

Stefan, you make my day!

Not applicable

Re: Want Ratio of one column to another in a chart. (One column is full accumulation)

Hi again Stefan,  I don't suppose you would know how to make the code above work for 12 stebs back accumulation rather than full accumulation?

Not applicable

Re: Want Ratio of one column to another in a chart. (One column is full accumulation)

Guess I figured it out.  Pretty easy solution, just put 12 in for rowno().

Community Browser