Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

From slider to graph

Hello,

I am usind a Slider object to set the value of a variable y on a range from 1 to 10, with step 1. A table then uses the value of the variable to show on one side the number of items that have some value bigger than y and on the other side the number of those that have a value smaller than y.

What I wish to do now, is to get rid of the Slider and have graph whose x dimension is layered from 1 to 10 and etween 1 and 2 counts the number of items which have a value between 1 and 2, next between 2 and 3 and so forth.

I hope this is understandable...

Can anyone help me with it?

Thank you very much!

5 Replies
IAMDV
Honored Contributor II

From slider to graph

Please can you post QV document with sample data? It will be easy to look into the data...

TIA!

Cheers - DV

Not applicable

From slider to graph

I give you a line of code, hoping that it helps. In the Slider I set the variable vRate then I calculate in a chart the number of contacts that have a higer activity rate like this

count(aggr(if($(ActivityRate)>=vRate,[ID Contact]),[ID Contact]))

Roughly, what I would like to have is a chart like

count(aggr(if(vRate<=$(ActivityRate)<vRate+5%,[ID Contact]),[ID Contact]))

Counting the number of Contacts that have a activity rate between 0 and 5%, then between 5% and 10% and so forth till 100%... I think what I lack is a way to iterate on vRate.

IAMDV
Honored Contributor II

Re: From slider to graph

Hi,

Have you considered using Dollar Sign Expansion with search capabilities? It is difficult for me to demostrate without the QV document. However, below is the example of what I am referring to...

COUNT(

    {$<

        TimeStampValue = {'>= $(=($(vMinCurrentTime))-1) <=$(=($(vMaxCurrentTime))) '} ,

        Q_No ={'Q1'}

    >}

Resp_ID)

The above expression Counts the Resp_ID for Q1, then it calculates the values for greater than MinCurrentTime and less than MaxCurrentTime. I had used these variables within the slider.

Good luck!

Cheers - DV

Not applicable

From slider to graph

Thank you! At the moment I solved my problem by creating a chart, with no dimensions, and then calculating

count(aggr(if(0<=$(ActivityRate)<0.1,[ID Contact]),[ID Contact]))

then

count(aggr(if(0.1<=$(ActivityRate)<0.2,[ID Contact]),[ID Contact]))

then

count(aggr(if(0.2<=$(ActivityRate)<0.3,[ID Contact]),[ID Contact]))

ecc

This tells me how big is each segment...

I  guess there should be a more elegant solution, but I'm quite new to QV.

IAMDV
Honored Contributor II

Re: From slider to graph

Excellent! I am glad that you got it working.

Cheers - DV

Community Browser