Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Reference line X - Axis challenge

Hi guys, as you know, you can do reference lines in Y- Axis and X- Axis. I often use Y-axis reference lines to show minimum and maximum range values, and in this case I want to add another X-axis to show if a calculation is above or below the maximum value.

Here's my chart with a Y- Axis line maximum value of 90 :

Top Y.png

And I'd like to add additional X-axis lines when the value is greater than 90 :

Top X.png

Here I have two problems :

1- I have calculated a field called "check" that says if the current value is greater or lower than 90, but I cannot show it properly in the X-Axis, in the image is just the desired result. (There are only 3 of them because I've printed manually).

2-When you allow the "continous" chek in the tab Axis inside the chart, it shows all the dates available, including the weekends. They are easy to see in the chart inside the green rectangles, because they have no value (not squares filled).

Do you know how could I get my desired result?

I've attached the example if you want to try.

Many thanks in advance.

Regards, Marcel.

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

Hi Marcel,

In the attached example I've dynamically added reference lines using error bars, it's a bit tricky with the min/max y axis settings, but maybe you can use this.

For the weekends I've changed the background color of the lines to transparent.

See attached

XAxisRef.png

View solution in original post

6 Replies
swuehl
MVP
MVP

1) I don't think you can dynamically add reference lines per expression.

2) A continuous axis is linear in time, so you can't avoid showing weekend dates / the gaps.

If you want to highlight certain points, there might be alternatives, like

QlikFit: Qlikview Lean tips #1: How to highlight series of points that violate control rules on a ch...

Counters in the Load

Basically I would start with looking into expression attributes that will check expression value larger than 90 and then change attribute.

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thanks swuehl! It was useful.

Regards, Marcel.

stigchel
Partner - Master
Partner - Master

Hi Marcel,

In the attached example I've dynamically added reference lines using error bars, it's a bit tricky with the min/max y axis settings, but maybe you can use this.

For the weekends I've changed the background color of the lines to transparent.

See attached

XAxisRef.png

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thanks Piet! That's a good trick! It would be awesome if there was another easy trick to save the useless weekend dates.

Regards, Marcel.

swuehl
MVP
MVP

Just disable 'continuous' (no need for the x-axis ref lines then).

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thanks for that swuehl!  I didn't realized that.