-
Re: Current Month , Current and previous years
youssef belloum Apr 16, 2018 11:58 AM (in response to K Kv)EDITED:
Hi,
try this:
If( GetSelectedCount(Month)=0,
Sum(Sales),
Sum({$<[Date]={">=$(=Date(MonthStart(Max(Date))))<=$(=Max(Date))"}>}Sales)
-
Re: Current Month , Current and previous years
K Kv Apr 17, 2018 3:33 AM (in response to youssef belloum)-
Re: Current Month , Current and previous years
youssef belloum Apr 17, 2018 3:38 AM (in response to K Kv)Would you be able to attach some data (which represent your table structure) ?
-
Re: Current Month , Current and previous years
K Kv Apr 17, 2018 9:57 AM (in response to youssef belloum)
-
-
-
-
Re: Current Month , Current and previous years
Mark Little Apr 17, 2018 10:11 AM (in response to K Kv)Hi,
I think that you need something like,
If( GetSelectedCount(Month)<>0,
Sum(Sales),
Sum({$<[Date]={">=$(=Date(MonthStart(Max(Date))))<=$(=Max(Date))"}>}Sales)
So you are saying if a month is selected the sum(Sales) Else ....
Mark
-
Re: Current Month , Current and previous years
K Kv Apr 17, 2018 10:17 AM (in response to Mark Little )-
Re: Current Month , Current and previous years
Mark Little Apr 17, 2018 10:25 AM (in response to K Kv)Hi,
When you remove the if i would expext to see what you are seeing.
The $ in your set analysis means inculde any selections, so you select May your date field is only looking at dates in May.
If you always want to show May, Then maybe change the $ to 1, but that would always ignore all selections.
I personally, make flags in my script to mark current month, Current year dates to make the Set analysis quicker and easier.
Mark
-
-