Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
i have one more,
ID, Date, Sales
200, 02/02/2015, 250
300, 02/03/2015, 235
400, 02/04/2015, 190
500, 02/05/2015, 290
600, 02/06/2015, 250
700, 02/09/2015, 200
400, 02/04/2016, 190
500, 02/05/2016, 290
600, 02/06/2016, 250
700, 02/09/2016, 200
]
i have 2016 years records also..
but i want compare with today() date only...
like this
Max(date) <=Today()
How to get current Vs previoue month (Means Feb Vs Jan)
How to write in SetAnalysis??
Thanks in Advance...
Hi,
Use below expressions
Current Month
=Sum({<Date={'>=$(=MonthStart(Today()))<=$(=Today())'}>} Sales)
Previous Month
=Sum({<Date={'>=$(=MonthStart(Today(), -1))<=$(=MonthEnd(Today(), -1))'}>} Sales)
Hope this helps you.
Regards,
Jagan.
Hi,
For Current Month
Sum({<Date={">=(date(Monthstart(Today())))<=date(Today())"}>}Sales)
For Previous Month
Sum({<Date={">=(date(Monthstart(Addmonths(Today(),-1)))<=date(AddMonths(Today(),-1))"}>}Sales)
Note: Modify it according to Date Format.
Regards
Hi,
Try the following Expression:
For Current Month
=Sum({<Date={'>=$(=date(Monthstart(Today())))<=$(=date(Today()))'}>}Sales)
For Previous Month
=Sum({<Date={'>=$(=date(Monthstart(Addmonths(Today(),-1))))<=$(=date(Addmonths(Today(),-1)))'}>}Sales)
Regards,
Er.Mohammad
Hi Max,
I am not getting value..
Please can you check once..????
PFA,
Hi,
Try with suggestion given by mohammadkhatimiti
Regards,
Hi,
Use below expressions
Current Month
=Sum({<Date={'>=$(=MonthStart(Today()))<=$(=Today())'}>} Sales)
Previous Month
=Sum({<Date={'>=$(=MonthStart(Today(), -1))<=$(=MonthEnd(Today(), -1))'}>} Sales)
Hope this helps you.
Regards,
Jagan.
PFA, hope it will help.
Dear Paul
i have tried the formula as suggested by Jagan, and it is giving correct result. You can proceed with the formula suggested.
Regards
Kushal T