Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all
Following are my expression for showing current year stock value using avg clause , Now Same thing I want to display for LAST YEAR SAME PERIOD
How to achieve the same.
=SUM(AGGR(
(
(SUM({$<FinancialYear=,Quarter=,MonthName=,[Posting Date] ={"<=$(=MonthEnd(Max([Posting Date])))>=01/04/2012"},[Inv Flag]={0,1,3,5}>}QTY_SIGNED) /* Closing Qty of prev month*/
-
SUM({$<FinancialYear=,Quarter=,MonthName=,[Posting Date] ={"<=$(=MonthEnd(Max([Posting Date])))>=01/04/2012"}>}[Sales Invoice Qty]) /*sales Qty from 1/4/12 till date*/
-
SUM({$<FinancialYear=,Quarter=,MonthName=,[Posting Date] ={"<=$(=MonthEnd(Max([Posting Date])))>=01/04/2012"}>}[Sales Bonus Qty]) /*sales Bon Qty from 1/4/12 till date*/
+
SUM({$<FinancialYear=,Quarter=,MonthName=,[Posting Date] ={"<=$(=MonthEnd(Max([Posting Date])))>=01/04/2012"},[Sales Return Type Code]={0}>}[Sales Return Qty]) /*sales Ret Qty from 1/4/12 till date*/
+
SUM({$<FinancialYear=,Quarter=,MonthName=,[Posting Date] ={"<=$(=MonthEnd(Max([Posting Date])))>=01/04/2012"},[Sales Return Type Code]={0}>}[Sales Return Bonus Qty]) /*sales Ret Bon Qty from 1/4/12 till date*/
)
*avg([Stat Rate Inv]))/100000
,[Product Batch Code],[Location Code],[Product Code],[Expiry Date]))
Hello
Try this:
=
Sum({<Ano= {$(=year(max(DATA_REFERENCIA))-1)},
[Semana Ano+Dia Semana Num]= {">=$(=min({<Ano= {$(=year(max(DATA_REFERENCIA)))},
Mês= {$(=month(max(DATA_REFERENCIA)))} >}[Semana Ano+Dia Semana Num]))"} -
{"> $(=max({<Ano= {$(=year(max(DATA_REFERENCIA)))},
Mês= {$(=month(max(DATA_REFERENCIA)))} >}[Semana Ano+Dia Semana Num]))"},
DATA_REFERENCIA=,
Dia =
>} PRECO_LIQUIDO)