Dynamic Reference Lines w/ Paramater Actions

Today DS28 were shown how to create Dynamic reference lines.

We started by creating a line graph showing the sales per month over time using the Superstore dataset.

Then we created parameters, firstly for the selected date.
Create a parameter with data type set to 'Date'
Then input a current value - in this case we need to use the 1st of any month
Set the allowable values to 'Range' and in this case we want the minimum and maximum dates that are in our data set, with a step size of 1 month. This can be changed for day, month, quarter or year depending on the range of your data.

We then need to create a similar parameter for the Monthly sales.
Choose a min, max and step size that fits your data.

We could then use our parameters to create the reference lines for the selected date and monthly sales.

Right click firstly on either axis and we change the 'value' to the relevant parameter.
In the case Selected Date for the x-axis and 'Month Sales' for the y-axis.

For an even deeper visual representation we can add colour to show which months had higher sales than the month the viewer has selected using the following calculation.

So now when we select a point on our chart, we are shown all the months were the sales were higher than those on the selected date.

Author:
Katie Matkin
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab