# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## Qlik Sense Time Intervals on Line Chart

Hey, guys!
I'm new to Qlik Sense. I made a line chart, which has X-axis as Date and Y-axis as Sales. Now I need to add vertical lines or some marks to show on this chart time intervals (when an advertising campaign started and when it finished). Please, give all possible solutions, advises and recommendations.

Elena

Tags (2)
1 Solution

Accepted Solutions
Contributor III

## Re: Qlik Sense Time Intervals on Line Chart

Hi Elena

I don't think you can add vertical reference lines as you want them.

I have come up with another solution which i think looks best using markers.

You could convert it to a combo chart and add an extra measure that is an if statement.

For example:

Note - I used week numbers for my calculation and this could be converted to actual dates

Main expression = Sum(Sales)

Extra expression = if(Week= 6 or Week=10, sum(Sales))

Display the Extra expression as a Marker (could use bars but personally don't think it looks so good) and make sure colours are different.

Result would be like below.

Hope this helps

Dan

4 Replies
Contributor III

## Re: Qlik Sense Time Intervals on Line Chart

Hi Elena

I don't think you can add vertical reference lines as you want them.

I have come up with another solution which i think looks best using markers.

You could convert it to a combo chart and add an extra measure that is an if statement.

For example:

Note - I used week numbers for my calculation and this could be converted to actual dates

Main expression = Sum(Sales)

Extra expression = if(Week= 6 or Week=10, sum(Sales))

Display the Extra expression as a Marker (could use bars but personally don't think it looks so good) and make sure colours are different.

Result would be like below.

Hope this helps

Dan

New Contributor III

## Re: Qlik Sense Time Intervals on Line Chart

If it's not difficult for you, please explain to me how my expression will look like. It comes to me like:

If(%date='StartCamp', Sum(Sales))

where StartCamp is field's name and I want to check its values.

I appreciate

Big thanks

Elena

Contributor III

## Re: Qlik Sense Time Intervals on Line Chart

I'm assuming %date is a date field

Therefore for my example you would need to replace 'StartCamp' with the actual date (make sure its in the same date format or it probably won't work eg 'YYYY-MM-DD' etc.).

for example:

If(%date='2016-08-01', Sum(Sales))

Dan

New Contributor III

## Re: Qlik Sense Time Intervals on Line Chart

Ok, I got it! Thank you for your help