Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create a customized trend line in a chart?

Hi, I need to create a customized linear trend line of the graph shown below:

Immagine.jpg

My trend line should start from the value of "gen-mar 2008" (aproximately 0 in this case) and go straight to the value of "lug-set 2013" (aproximately 1,300,000). How can I do that? Thanks.

5 Replies
Gysbert_Wassenaar

Add another expression. Something like =if(Month=min(total Month) or Month=max(total Month), sum(Value)). And don't suppress Zero-Values.


talk is cheap, supply exceeds demand
alexandros17
Partner - Champion III
Partner - Champion III

La cosa più semplice che mi viene in mente è quella di caricare con un load inline una serie di valori da utilizzare poi come espressione:

quaklcosa simile a:

load * inline [

mese, qty

gen-mar 2008, 0

apr-mag 2008, 1000

..... e così via fino al tuo valore

];

fammi sapere

Not applicable
Author

It's not my case, the dimension is dynamic as is the range of months.

Not applicable
Author

My chart is dynamic, the user can select the period of analysis and through the set analysis i check the dates. If I understood well I should write something like this:

if(Dimension1='gen-mar 2008' or Dimension1='lug-set 2013', sum(Value)).


Is that correct?

Not applicable
Author

I solved writing this:

=If(Only({$<DATE={">=$(vDateMin)<=$(vDateMax)"}>} MonthName(DATE))=MonthName('$(vDateMin)')

     OR

    Only({$<DATE={">=$(vDateMin)<=$(vDateMax)"}>} MonthName(DATE))=MonthName('$(vDateMax)') ,

  Sum({$<DATE={">=$(vDateMin)<=$(vDateMax)"}>} VALUE)

)

Where vDateMin and vDateMax are variables edited by the user, and MonthName(DATE) is the calculated dimension of the chart.