Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

kmstephenson
New Contributor III

conditionally hide/show line on chart based on x-value

Hi All,

I would like to only show the line on a combo chart for x-values -12 to -1, and subsequently from 1 to 12. I do not want a line from -1 to 1. How can I do this? The chart is technically not continuous because I have no 0 values, but I am setting the x-axis to continuous to show 0 on the chart. See below - no data point at 0, and do not want the line drawn from -1 to 1.

I currently have the line style set: IF(month_num<-1,'<S2><W0>',IF(month_num>=1,'<S2><W0>'))

Is there any style for no line?

Thanks!!

1 Solution

Accepted Solutions
vishsaggi
Esteemed Contributor III

Re: conditionally hide/show line on chart based on x-value

May be use the expression in the background and change it to white()

IF(month_num > -1, White(),IF(month_num <=1, White() ))


Try this/.

6 Replies
vishsaggi
Esteemed Contributor III

Re: conditionally hide/show line on chart based on x-value

May be use the expression in the background and change it to white()

IF(month_num > -1, White(),IF(month_num <=1, White() ))


Try this/.

kmstephenson
New Contributor III

Re: conditionally hide/show line on chart based on x-value

The problem is it looks like the line appears to be drawn with the data point prior --- so I need to set month_num=-1 to WHITE for the line to disappear, but that also makes the data point at -1 disappear....

kmstephenson
New Contributor III

Re: conditionally hide/show line on chart based on x-value

I just created two separate expressions that are the exact same - one for the line, and one for the symbols and this worked!

vishsaggi
Esteemed Contributor III

Re: conditionally hide/show line on chart based on x-value

Glad it worked. I just gave the expression for you to try how it looks as I do not have the sample app to tweak around.

Good work.

kmstephenson
New Contributor III

Re: conditionally hide/show line on chart based on x-value

Thank you! I had been playing around with the background color and line styles but had used the same expression for both the symbol and line - your response helped me realize I needed to copy the expression and have one for the line and one for the symbol! Thanks again!!

vishsaggi
Esteemed Contributor III

Re: conditionally hide/show line on chart based on x-value

Please mark the answers with helpful/correct so that other members will benefit. :-)