Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
Thank you, Dan, for your quick and kind reply!
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
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
Ok, I got it! Thank you for your help:)