If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
I have the following table:
And I created a graph of average item cost per command, but I need to add a trend line. I tried multiple ideas posted on the community but I did not succeed to have my trend line.
bellow graph in excel, and the trendline in orange I need in qlick sense:
Thanks a lot for your help.
Create a new dimension is ur script (numeric) as follow:
subfield(Command,' ',2) as CommandNum, (this is to transform ur commands from command 1 to 1 etc
then, use a combined graph;
as a measure:
1)sum(COST) / Sum([NB ITEMS]) : as bar
linest_m(total aggr(sum(COST) / Sum([NB ITEMS]),CommandNum),CommandNum)*CommandNum
+linest_b(total aggr(sum(COST) / Sum([NB ITEMS]),CommandNum),CommandNum) : as line
sort as follow:
View solution in original post
did u see this?
Calculating trend lines, values and formulas on charts and tables in Qlik Sense
Many Thanks! The step I missed is X axis should be numeric and not text.
Could you please help why the trend curve is not straight?