Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I am using the below expressing for calculating the Six months trailing period
SET ANALYSIS EXPRESSION:-
sum({<Year=,[Month Name Short Year]=,date_con ={'>=$(=addmonths(max(date_con),-5))<=$(=max(date_con))'},[Metric_ID] ={'OP_001'} >}Result)
Now i have to calculate the YTD ... So is there any way to calculate the YTD by changing the above expression...
or
IF there is another way to calculate the YTD
Urgent...Please ...
Regards,
Sandeep.
Try with this
sum({<Year=,[Month Name Short Year]=,date_con ={'>=$(=YearStart(max(date_con)))<=$(=max(date_con))'},[Metric_ID] ={'OP_001'} >}Result)
i would do that: create a variable vMaxYear= =Year(Today(date_con)) and another vToday =date(Today())
then try the expression:
sum({<Year={$(vMaxYear)}, date_con={'<=$(vToday)}>} Result)
Hi
Use like this
Set the variable :
vSelectDate = MakeDate(Year(Max(date_con)),Month(Max(date_con)),Day(Max(date_con)))
=Sum({<Year=,[Month Name Short Year]=,date_con ={'>=$(=YearStart(vSelectDate))<=$(=vSelectDate)'},[Metric_ID] ={'OP_001'} >}Result)
Regards,
The above expression seems to be working ... Can i know how to give the starting Month as April and ending month as march ... can u please help on this ...
HI
Try like this
sum({<Year=,[Month Name Short Year]=,date_con ={'>=$(=YearStart(max(date_con),0,4))<=$(=YearEnd(max(date_con),0,4))'},[Metric_ID] ={'OP_001'} >}Result)
Hi,
First give the variable like this:
vSelect= MakeDate(Year(Max(date_con)),Month(Max(date_con)),Day(Max(date_con)))
you can arrive in march :
=MonthStart(vSelect,-2)
April:
MonthEnd(vSelect,-3)
Hope its help,
Iyyappan
Hi,
You have mention the start month in the YearStart function
YearStart(max(date_con), 0, 4)
Try this
sum({<Year=,[Month Name Short Year]=,date_con ={'>=$(=YearStart(max(date_con), 0, 4))<=$(=max(date_con))'},[Metric_ID] ={'OP_001'} >}Result)
Hope it helps