Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to get the Linest_M function working, the goal is for when the slope is positive the line is green, and when it is negative it is red. the x value is YearMonth and the Y value is Sum([Billing Quantity])/Sum(#Units)
Here is what I have:
=if(
LINEST_M(Sum([Billing Quantity])/Sum(#Units), YearMonth)
<0, rgb(247,93,79),rgb(155,215,247)
)
Please let me know how to correct this
May be try this
=If(Linest_M(TOTAL Aggr(Sum([Billing Quantity])/Sum(#Units), YearMonth), YearMonth) < 0, RGB(247,93,79), RGB(155,215,247))
May be try this
=If(Linest_M(TOTAL Aggr(Sum([Billing Quantity])/Sum(#Units), YearMonth), YearMonth) < 0, RGB(247,93,79), RGB(155,215,247))
Is it supposed to fluctuate by the x value?
Really, why? you want to know the slope of the line, right? Slope stays the same, doesn't it?
Ideally it would be a monthly snapshot of the slope, as if taking a derivative of the original line, but that might not be the way the function works.
Are you looking to find the monthly slope based on daily data? May be try this
Linest_M(Aggr(Sum([Billing Quantity])/Sum(#Units), YearMonth), YearMonth, Date)