3 Replies Latest reply: Jan 6, 2018 8:59 AM by Haidar HAJ ALI RSS

    Trendline

    Haidar HAJ ALI

      Hello,

       

      I have the following table:

         

      CommandNB ITEMSCOST
      Commad 1650
      Commad 2430
      Commad 3535
      Commad 41060
      Commad 5535
      Commad 61465
      Commad 7855
      Commad 81045

       

      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.

      Example:

      1. linest_m(total aggr(if(COST/[NB ITEMS],COST/[NB ITEMS]),Command),Command)* 
      2. only({1}Command)+linest_b(total aggr(if(COST/[NB ITEMS],COST/[NB ITEMS]),Command),Command)

       

      bellow graph in excel, and the trendline in orange I need in qlick sense:

       

      Sans titre.png

       

      Thanks a lot for your help.