Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to calculate the sum(sales) for today's date vs last year same date.
Like today's date (2/28/2017 ) sales is 222 and i need to compare the sales for 2/28/2016
Date field: Solddate
Logic: sum(sales)
Thanks..
Sum({$<Solddate={"$(=Date(AddYears(Max(Solddate), -1), 'MM/DD/YYYY'))"}>} Sales )
Use below condition on your Set analysis
2/28/2017
Sum({<Date = {'$(=Today())'}>}Sales)
2/28/2016
Sum({<Date = {'$(=AddYears(Today(),-1))'}>}Sales)
Hi,
I need to get this as dynamic like if i select 2013 the sales is comparative in the chart like 2/28/2013 sales vs 2/28/2012.
Thanks..
i think the below should be working as dynamic !!!
this year
Sum({$<Solddate={"$(=Date((Max(Solddate)), 'MM/DD/YYYY'))"}>} Sales )
previous year
Sum({$<Solddate={"$(=Date(AddYears(Max(Solddate), -1), 'MM/DD/YYYY'))"}>} Sales )
Hi ,
The below logic alone is not working.
Logic: Sum({$<Solddate={"$(=Date((Max(Solddate)), 'MM/DD/YYYY'))"}>} Sales )
Thanks..
may be check with your Sales , or sales , or SALES..
try to change as below ..
Sum({1<Solddate={"$(=Date((Max(Solddate)), 'MM/DD/YYYY'))"}>} sales )
Sum({1<Solddate={"$(=Date(AddYears(Max(Solddate), -1), 'MM/DD/YYYY'))"}>} sales )
hope your dimnsion should be : Solddate
You can do a master calendar from your sold date:
Load
Year(Solddate) as Year,
Month(Solddate) as Month,
Day(Solddate) as Day,
SoldDate,
Sales
From....
After That, you can use an expresion like this:
Sum({<Year = {$(max(Year))}>}Sales)
-
Sum({<Year = {$(max(Year)-1)}>}Sales)
So, Here what if you have forecast of data till November for 2017. In this case, If you select 2017 then what are expecting to see?