Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

haneeshmarella
Contributor

How to put target lines in line graph for dimension with two field and single expression?

Hi, I have a dimension based on the formula

IF(len(trim([CONTAINER]))=0,'OFF-LINE','ON-LINE') as OFF_ON_LINE

The expression for the above dimension is count(distinct case#).

I have created a line graph with X-Axis having time, and Y-axis having the expression. I plotted the dimension which gives two lines, ONLINE and OFFLINE counts. But when I add target calculations in expressions, the ONLINE and OFFLINE lines become one.

The target lines are 70*count (Users) and 110*count(Users). I also tried adding them as reference lines but they don't work. Any alternative or what am I doing wrong here?

Your help is highly appreciated. Thank you.SS.PNG

6 Replies
YoussefBelloum
Esteemed Contributor

Re: How to put target lines in line graph for dimension with two field and single expression?

Hi,

what do you mean by "added target calculations on expressions" ? is it just another expression ?

can you share with us the wrong output and the expected ouput ?

thevingo
Contributor

Re: How to put target lines in line graph for dimension with two field and single expression?

Hi

You mentioned single expression, but I think with 2 additional expressions it will be easy

ogautier62
Valued Contributor II

Re: How to put target lines in line graph for dimension with two field and single expression?

Hi,

when you say two lines becomes one :

you see just ONLINE and OFFLINE disappears ?

what is your model ?:

it maybe for example that user not linked directly with field container,

so if container null, no possible count and the line disappears

regards

haneeshmarella
Contributor

Re: How to put target lines in line graph for dimension with two field and single expression?

I added two expressions as two separate target lines: 70*count (Users) and 110*count(Users)


And when I do so, the main OFFLINE, ONLINE disappear. Perhaps they get over ridden.


However, I did some digging and found that my OFFLINE/ONLINE expression needed some changes, and now it works. Thank you for your response.

haneeshmarella
Contributor

Re: How to put target lines in line graph for dimension with two field and single expression?

I added two expressions as two separate target lines: 70*count (Users) and 110*count(Users)


I found that my OFFLINE/ONLINE expression needed some changes, and now it works. Thank you.

haneeshmarella
Contributor

Re: How to put target lines in line graph for dimension with two field and single expression?

I saw a sum of both OFFLINE and ONLINE as one line with sum of them. However, I tweaked my original expression, and now it works.

Thank you Olivier for your response.

Community Browser