Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

chrisg
Contributor II

Show or hide lines in a chart?

Hi,

i just want to provide a chart with different calculations and lines - such as average, target value e.g.

How is it possible to show or hide lines in a chart?

many thx

Christoph

4 Replies
paridhimantri
Contributor

Re: Show or hide lines in a chart?

Hi

Yes you can by using calculated condition on expression, which will hide and show the lines according to given condition.

Thanks

Paridhi

omarbensalem
Esteemed Contributor

Re: Show or hide lines in a chart?

I would suggest sthing like this:

Create an inline table:

load * inline [

MeasureID, Measure

1, Sales

2, Average

3, Target

];

Then in your presentation, as a selection field, choose your new created Measure field.

Now, in your chart,

choose as a dimension;

if(MeasureID=1, YourSalesExpression,

if(MeasureID=2, YourAvgExpression,

if(MeasureID=3,YourTargetExpression)))

Per analogy, the result would be with my Measure:

sum({<$(vSetPeriodPres)>}if(kpiID='CA',

CA,

if(kpiID='Quantité',

[Quantité] ,

if(kpiID='Marge',

Marge ))))

Capture.PNG

Capture.PNG

Re: Show or hide lines in a chart?

Or you could look at using an Alternative Measure

There is a video in the Qlik Sense Help describing this functionality, https://help.qlik.com/en-US/sense/3.2/Content/Videos/Videos-alternative-dimensions-measures.htm

chrisg
Contributor II

Re: Show or hide lines in a chart?

Manymany thx - but how can i handle the labeling of the line?