My requirement is to get the last ytd
In last ytd it should display last year march value for the ytd below is the expression I am getting correct ytd can anyone guide me for the value to display on LAST YTD should display March value
YTD Expression=AVG(AGGR(AVG({1<FOR_DATE = {">=$(=DATE(YEARSTART(v_Date, 0, 4), 'DD/MM/YYYY'))"}, FOR_DATE = {"<=$(v_Date)"}>}Actual), Unit, KPI, UOM, Area, [Sub Area], Equipment))
Variables Used
v_Date=DATE(MAKEDATE(v_Max_Year, v_Max_Month), 'DD/MM/YYYY')
v_Max_Year==MAX(Year)
v_Max_Month =IF(GetSelectedCount(Month) <= 0, MAX(NUM_MONTH), NUM_MONTH) @
01/04/2018 = output for v_Date
Max(NUM_MONTH) = 4
my requirement is basis on financial year wise so using(v_Date,0,4) which starts from 1st April
due to variable change it is affecting other expressions such as ytd actual etc.
any other way for output
But did the variable change worked for last YTD ?
Br,
KC
Try this:
AVG(AGGR(AVG({1<FOR_DATE = {">=$(=DATE(AddYears(YEARSTART(v_Date, 0, 4),-1), 'DD/MM/YYYY')) <=$(=DATE(AddYears(v_Date,-1),DD/MM/YYYY'))"},Year=,NUM_MONTH=>}Actual), Unit, KPI, UOM, Area, [Sub Area], Equipment))
no
You can define same for outer analysis like
AVG({1<FOR_DATE = {">=$(=DATE(AddYears(YEARSTART(v_Date, 0, 4),-1), 'DD/MM/YYYY')) <=$(v_Date)"}>} NODISTINCT AGGR(AVG({1<FOR_DATE = {">=$(=DATE(AddYears(YEARSTART(v_Date, 0, 4),-1), 'DD/MM/YYYY')) <=$(v_Date)"}>}Actual), Unit, KPI, UOM, Area, [Sub Area], Equipment))
If nothing - I would suggest you to paste sample?