If you need to create a reference line that moves to a selected point, this is the blog for you. I will show you how to achieve this using simple parameter actions.
Simply, we will create a parameter to determine where our reference line sits. We will then use a parameter action to change that parameter, and therefore the reference line position, based on where we click.
Lets start by creating a chart:
![](https://www.thedataschool.co.uk/content/images/2022/08/image-151.png)
Now lets add a reference line. Select the "analytics" pane and drag "reference line" to your measure.
![](https://www.thedataschool.co.uk/content/images/2022/08/image-152.png)
The "Edit Reference Line" box will appear. Here we can change what determines the position of our line. In "Value" - choose "Create a new parameter". Default settings for this parameter are fine.
![](https://www.thedataschool.co.uk/content/images/2022/08/image-162.png)
We now want our parameter to change based on the points we click on. We use a parameter action to accomplish this. Select Workbook>Actions and then Add Action>Change Parameter.
We can then define our parameter action. We want to "Run action" (i.e. change the reference line position) when we select a point. Our target parameter should be the one we just created, and the "source field" should be the measure we want the reference line to reflect.
![](https://www.thedataschool.co.uk/content/images/2022/08/image-165.png)
You should now have a reference line that moves to any point you select!
![](https://www.thedataschool.co.uk/content/images/2022/08/BlogGif1-4.gif)