Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
i use below expression for get sum of sales at select date vs same day as last year
=num(sum({1<U_SalesDate = {"$(=date(Addmonths(U_SalesDate,-12,0),'DD/MM/YYYY h:mm:ss TT'))"}>}
U_Value),'##0.00')
but its work only single day its not working with multiple date selection in calendar input field.
Kindly solve this
Regards
SASIKUMAR
Please check the variables , I have created on front end.
try this
=num(sum({1<U_SalesDate = {"$(=date(Addmonths(max(U_SalesDate),-12,0),'DD/MM/YYYY h:mm:ss TT'))"}>}
U_Value),'##0.00')
hi kush141087,
i already try this but its also return only single prior date, not two or more dates.
Ex:
if i select 15.01.15 in calendar its return 15.01.14
and i select 15.01.15 & 16.01.15 in calendar its return only 16.01.14. not sum of both dates
So when you select the 15.01.15 & 16.01.15, which dates sum you want? and when you select single date which date sum you want? Please clarify
May be this?
=num(sum({1<U_SalesDate = {">=$(=date(Addmonths(max(U_SalesDate),-12,0),'DD/MM/YYYY h:mm:ss TT')) <= $(=date(Max(U_SalesDate)))"}>} U_Value),'##0.00')
Or Can you let us know which dates you want to sum when you selected two dates at a time, Pelase
if i select 15.01.15 i want sum of 15.01.14
and if select 15.01.15 & 16.01.15 & more date , i need to return sum of past year dates like (15.01.14 & 16.01.14 & more date) both dates
if i select 15.01.15 i want sum of 15.01.14
and if select 15.01.15 & 16.01.15 & more date , i need to return sum of past year dates like (15.01.14 & 16.01.14 & more date) both dates
create variable
vDateRangeCount = if(getselectedcount(Date)<=1,0,getselectedcount(Date))
num(sum({1<U_SalesDate = {">=$(=date(Addmonths(max(U_SalesDate),-12,0)-$(vDateRangeCount),'DD/MM/YYYY h:mm:ss TT'))<=$(=date(Addmonths(max(U_SalesDate),-12,0),'DD/MM/YYYY h:mm:ss TT'))"}>}
U_Value),'##0.00')
Kitna points jama Karega
if i select 15.01.15 i want sum of 15.01.14
May be this?
Sum({<U_SalesDate = {"$(=AddYears(U_SalesDate,-1))"}>} U_Value)
and if select 15.01.15 & 16.01.15 & more date , i need to return sum of past year dates like (15.01.14 & 16.01.14 & more date) both dates
It will work same if you mentioned same in expression