Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
haneeshmarella
Creator II
Creator II

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
Champion
Champion

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
Creator
Creator

Hi

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

ogautier62
Specialist II
Specialist II

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
Creator II
Creator II
Author

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
Creator II
Creator II
Author

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
Creator II
Creator II
Author

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.