Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
cfountain72
Creator II
Creator II

Conditional Reference Line

Hello, 

This seems like a very simple request, but I can't get it to work. I want to add a Reference Line to a chart that is 20 on dates before 5/1/2024, and 30 on dates after 5/1/2024. However, this expression is ignoring the date comparison, so I just have a reference line at 30, regardless of the date. The [Transfer Start Date] field is a Date. Not sure what else to try. Any suggestions?

=if([Transfer Start Date] < '05/01/2024', 20, 30)

Thanks in advance for your help, 

Chris

Labels (3)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I believe a Reference Line is calculated only once for chart. If you want a line that is different per dimension, use a Measure line.

-Rob

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I believe a Reference Line is calculated only once for chart. If you want a line that is different per dimension, use a Measure line.

-Rob

cfountain72
Creator II
Creator II
Author

Thanks Rob. I'm surprised to hear that, but doing a Master Measure with the same expression for this purpose did work.