Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I need to calculate and compare the sales for current date vs last date.
EX: If user select year-2017,month-march,date-01 and my chart should show both 1st of march sales for 2017 and 2016.
This should be dynamic like if the user select 1st march of 2014 and my chart show both 1st of march sales for 2014 and 2013.
Attached is the scrambled application.
Thanks..
Use Floor(SoldDate) as SoldDate in Script
sum({<SoldDate={"$(=Num(addyears(max(SoldDate),-1)))"}>} ESTCUST) for Previous Year
Hi,
It's not working.Please suggest how to get this.
Thanks..
PFA
Hi,
Please try below
//Current Year Flag
If ( date-yearstart(date)<=today()-yearstart(today()),1,0) as CY
// Previous Year Flag
If ( AddMonths(date,-12)-yearstart(AddMonths(date,-12))<=AddMonths(Today(),-12)-yearstart(AddMonths(Today(),-12)),1,0) PY
Current Year Sales: Sum({$<[CY]={1}>}Sales)
Previous Year Sales: Sum({$<[PY]={1}>}Sales)