Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
mandilicious
Creator II
Creator II

Avg line on graph & change color when it goes below

Hi Champs

I have below graph and SLA within is 85% so they need to see line move horizontally from 85% on a graph  and if it goes below 85% it suppose to be red in color.

Graph2.PNG

Thanks

1 Solution

Accepted Solutions
stabben23
Master
Master

Hi,

create a Reference line->Definition With Expression:

count({$<campaign_id={"neo_za_en_service","neo_za_en_tech"},user_group={"NEO"},queue_seconds={"<=20"}>}phone_number)

-  count({$<campaign_id={"neo_za_en_tech","neo_za_en_service"},user_group ={"ABANDON"},queue_seconds={"<=20"}>}lead_id)

+ count({$<campaign_id={"neo_za_en_tech","neo_za_en_service"},user_group ={"ABANDON"},queue_seconds={"<=20"}>}lead_id)/100)

/  count({$<campaign_id={"neo_za_en_service","neo_za_en_tech"},user_group  ={"NEO"}>}phone_number))

then use Line Formatting->Color->Calculated, this expression

if(count({$<campaign_id={"neo_za_en_service","neo_za_en_tech"},user_group={"NEO"},queue_seconds={"<=20"}>}phone_number)

-  count({$<campaign_id={"neo_za_en_tech","neo_za_en_service"},user_group ={"ABANDON"},queue_seconds={"<=20"}>}lead_id)

+ count({$<campaign_id={"neo_za_en_tech","neo_za_en_service"},user_group ={"ABANDON"},queue_seconds={"<=20"}>}lead_id)/100)

/  count({$<campaign_id={"neo_za_en_service","neo_za_en_tech"},user_group  ={"NEO"}>}phone_number))<0.85, red(),green())

You could also hide and show reference line by adding a show condition, use the same Expression as in color, but change color code Red, green against 1,0

View solution in original post

6 Replies
stabben23
Master
Master

Hi,

click on the + sing on Your Expression. Use Backgroud color, copy and past Your Expression in here, add an if statment like:

if(Your copied Expression)<0.85, red())

stabben23
Master
Master

Or do you want a New Reference line in the same chart?

mandilicious
Creator II
Creator II
Author

Hi Staffan

Yes please that will also help and if i may ask how do i draw/put line that will start from 85% going from right on graph?

Graph3.PNG

Below is my exp.

=num((count({$<campaign_id={"neo_za_en_service","neo_za_en_tech"},user_group={"NEO"},queue_seconds={"<=20"}>}phone_number)

-  count({$<campaign_id={"neo_za_en_tech","neo_za_en_service"},user_group ={"ABANDON"},queue_seconds={"<=20"}>}lead_id)

+ count({$<campaign_id={"neo_za_en_tech","neo_za_en_service"},user_group ={"ABANDON"},queue_seconds={"<=20"}>}lead_id)/100)

/  count({$<campaign_id={"neo_za_en_service","neo_za_en_tech"},user_group  ={"NEO"}>}phone_number),'##.%')

stabben23
Master
Master

Hi,

create a Reference line->Definition With Expression:

count({$<campaign_id={"neo_za_en_service","neo_za_en_tech"},user_group={"NEO"},queue_seconds={"<=20"}>}phone_number)

-  count({$<campaign_id={"neo_za_en_tech","neo_za_en_service"},user_group ={"ABANDON"},queue_seconds={"<=20"}>}lead_id)

+ count({$<campaign_id={"neo_za_en_tech","neo_za_en_service"},user_group ={"ABANDON"},queue_seconds={"<=20"}>}lead_id)/100)

/  count({$<campaign_id={"neo_za_en_service","neo_za_en_tech"},user_group  ={"NEO"}>}phone_number))

then use Line Formatting->Color->Calculated, this expression

if(count({$<campaign_id={"neo_za_en_service","neo_za_en_tech"},user_group={"NEO"},queue_seconds={"<=20"}>}phone_number)

-  count({$<campaign_id={"neo_za_en_tech","neo_za_en_service"},user_group ={"ABANDON"},queue_seconds={"<=20"}>}lead_id)

+ count({$<campaign_id={"neo_za_en_tech","neo_za_en_service"},user_group ={"ABANDON"},queue_seconds={"<=20"}>}lead_id)/100)

/  count({$<campaign_id={"neo_za_en_service","neo_za_en_tech"},user_group  ={"NEO"}>}phone_number))<0.85, red(),green())

You could also hide and show reference line by adding a show condition, use the same Expression as in color, but change color code Red, green against 1,0

View solution in original post

stabben23
Master
Master

if you just want a static line, use a second line Expression 0.85

mandilicious
Creator II
Creator II
Author

Thanks Staffan you are the best it is working perfectly.