Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Change of variable does not effect line chart

Hello Community,

I have added a variable "firstDate" within a variable extension.

I have also created a line chart. The dimension of the line chart is "if(firstDate < secondDate, secondDate)". The measure is "count(name)".

I want this line chart to change if I change the variable, but it does not change.

Furthermore I have created a KPI wich shows if the "firstDate" is before the "secondDate", if I change the variable "firstDate" within the extension, the KPI displays the change.

Do you have any ideas why the line chart does not change any information?

Thank you for your help!

1 Solution

Accepted Solutions
hector_munoz_in
Valued Contributor

Re: Change of variable does not effect line chart

Hi Florian,

Instead of creating a calculated dimension could you try to add the condition in the expression? Something like:

Count(If(firstDate < secondDate, name))

Regards,

H

4 Replies
hector_munoz_in
Valued Contributor

Re: Change of variable does not effect line chart

Hi Florian,

Could you attach a sample? It seems that your code is correct...

Regards,
H

Not applicable

Re: Change of variable does not effect line chart

Hi Hector,

Capture.PNG

Here is a sample. I want the chart to start at 2017, if i change the variable to 01.01.2017.

The KPI changes if i change the variable, the chart not.

Thank you.

hector_munoz_in
Valued Contributor

Re: Change of variable does not effect line chart

Hi Florian,

Instead of creating a calculated dimension could you try to add the condition in the expression? Something like:

Count(If(firstDate < secondDate, name))

Regards,

H

Not applicable

Re: Change of variable does not effect line chart

This works, and I had to set the dimension to just "secondDate"

And the measure to

Count(If(firstDate < secondDate, name))

Thank you for the help.