Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Experts,
I have data since 2021 in my model.
I have to create Line Chart by MOnth/Year, the expression of Chart is as based on Running sum of last 12 months as per below.
((sum({<DESCRIPTION=,PARTNO=>} [FA_QTY_FUNC] * [AVERAGE_PRICE])
/
Rangesum(Above( Sum({<DESCRIPTION=,PARTNO=>}CONSUME_AVG_PRICE_FUNC),0,12)))
)*365
now as we have data from 2021 for whole 2021 our expression will not calculate correct running sum of last 12 months. so we want our graph shows only month onwards Jan-2022.
As soon as i am trying to do so my RangeSum() is considering Jan2022 as First month starts summing value from Jan2022 only. and my calculation starts showing wrong data as per functional requirement.
Can we have some expression which will give us last 12 month SUM even if we are showing it in Dimension.
Thanks in advance.
Hi @Raval ,
try if this works:
(
sum(
{
<DESCRIPTION=, PARTNO=>,
MonthYear={">=$(=MonthStart(Max(MonthYear), -11))<=$(=MonthEnd(Max(MonthYear)))"}
}
[FA_QTY_FUNC] * [AVERAGE_PRICE]
)
/
Rangesum(
Above(
Sum(
{<DESCRIPTION=, PARTNO=>
, MonthYear={">=$(=MonthStart(Max(MonthYear), -11))<=$(=MonthEnd(Max(MonthYear)))"}
}
CONSUME_AVG_PRICE_FUNC
)
,0,12
)
)
) * 365