Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Specialist
Specialist

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

View solution in original post

4 Replies
hector_munoz
Specialist
Specialist

Hi Florian,

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

Regards,
H

Not applicable
Author

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
Specialist
Specialist

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
Author

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.