Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
rednaks
Contributor
Contributor

Trend Line Drop-down

Dear Qlik Sense Community,

how can I add  a drop down menu that allows the user to choose between different trend line options for a given visualization?( as shown in this video from 2:12  https://www.youtube.com/watch?v=cJbou_x4gNg )  I'm using the Feb 2021 version. I would be very thankful if you could help me with this.

Best Regards

 

Labels (3)
2 Replies
justISO
Specialist
Specialist

Hi, I believe this approach was done with  'Variable input' drop down list, and trend-lines are calculated separately, not by just choosing one from the list introduced later with new Qlik updates. So basically if you want to recreate that, you need to take 'Variable input' extension from custom objects, choose variable and apply 7 dynamic values for it for different trend-lines. This is easiest part. Now, you need calculate these trend-lines separately and add additional measure expression to your chart. if (vYourVariable = 1, your_expresion_for_linear_trendline, if (vYourVariable = 2, your_epresion_for_power_trendline, ... and so on.

This forum topic could help you a lot with formulas:

https://community.qlik.com/t5/Qlik-Sense-Documents/Calculating-trend-lines-values-and-formulas-on-ch...

rednaks
Contributor
Contributor
Author

Thank you for your answer. Indeed, I tried this approach. Unfortunately, implementing the trend line formulas in Qlik is a very tedious task for a beginner like me.