cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a benchmark/trend line based on dynamic conditions to a chart?

cmiller
7 - Data Storage
7 - Data Storage

Hello, 

I'd like to add trend lines to a line chart (like this) but based on the data existing in the chart.

For example the benchmark line would be 5% higher than CVR1 and the Target line would be 6.5% higher than CVR1, this would be moving week on week.

Thank you in advance for your help! 

1 ACCEPTED SOLUTION

HamzaJ
12 - Data Integration
12 - Data Integration

Hey @cmiller ,

I dont know if the following is what you are looking for, but it can perhaps point you in the right direction. I do not know a lot of javascript so I tend not to meddle with it. 

In your case what you could do is;

  • Create a new measure in your chart
  • Give it the formula CVR1 * 1.05
  • Press OK, select the three dots and change the chart type of that measure to line
  • Rename the measure to Benchmark

Repeat for Target line. Both lines will now be based on the value of CVR1 for that week and not be a static line.

Hamza

 

View solution in original post

3 REPLIES 3

HamzaJ
12 - Data Integration
12 - Data Integration

Hey @cmiller ,

I dont know if the following is what you are looking for, but it can perhaps point you in the right direction. I do not know a lot of javascript so I tend not to meddle with it. 

In your case what you could do is;

  • Create a new measure in your chart
  • Give it the formula CVR1 * 1.05
  • Press OK, select the three dots and change the chart type of that measure to line
  • Rename the measure to Benchmark

Repeat for Target line. Both lines will now be based on the value of CVR1 for that week and not be a static line.

Hamza

 

cmiller
7 - Data Storage
7 - Data Storage

This works perfectly! 

Thanks so much for your help 😀

DRay
Community Team Leader
Community Team Leader

Hello @cmiller ,

I’m following up because it looks like the solution offered by @HamzaJ worked for you.

If so, please click the 'Accept as Solution' button on their post. That way other users with the same questions can find the answer. If not, please let us know so that we can continue to help.

Thank you.

David Raynor (DRay)