Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
heiko_schmidt
Contributor III
Contributor III

Adding 2 different trend lines

Hello, i use a function to show a trend line :

linest_b (

          total aggr(

              Sum(Expression1),

               [Month]

           ),

           [Month]

      )

+

  Month *           

      linest_m (

          total aggr(

              Sum(Expression1),

               [Month]

           ),

           [Month]

      )

This one calculates the trend line for all available months.

Is it possible to show a second trend line in the same diagramm that only shows the trend for the past 6 months and a third one that shows the trend line for past 3 months to 3 months in advance.

Best regards

Heiko

4 Replies
shraddha_g
Partner - Master III
Partner - Master III

It is possible..

Add 3 different measures in line chart

heiko_schmidt
Contributor III
Contributor III
Author

Hello, Shraddha, thank you for your response.

Maybe the question was a little bit confusing. I know that it is possible.

I just don´t know how to set the right time interval.

Best regards

jonathandienst
Partner - Champion III
Partner - Champion III

Its hard to give detailed help without more information. Are you using a master calendar? In general, you would add set expression filters to the linest() function and/or the sum() functions inside the Aggr() expression.

I suggest that you upload a small sample file that contains enough data to get more detailed help.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
heiko_schmidt
Contributor III
Contributor III
Author

Hello Jonathan, yes I am using a master calendar.

Here is the sample file.

I want to show one trend line over all available months ( this already works) and another trend line for the last 6 months dynamically.