Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
how to write a set expression for sales in current year and not in previous year?
Thanks
John
Hie hope this helps.
=Sum({<Year={'$(=year(Today()))'}>}Sales)
Hi,
Try:
=Sum({<Year={$(=Max(Year))}>} Sales )
or
=Sum({<Year={'$(=year(Today()))'}>}Sales)
or
=SUM({$<Date = {'>=$(=YearStart(Today()))<=$(=MonthEnd(Today()))'}>}Sales)
Regards
Neetha
Thanks Neetha.
Can you please explain me, how this expression will check weather sales are present in previous year or not.
Hi John,
I believe the following set analysis expression may provide you with the results you seek.
sum({$<[Order Year] = p({$<[Order Year]={$(=max([Order Year]))}>}
[Order Year]) - p({$<[Order Year]={$(=max([Order Year])-1)}>}
[Order Year])>} Quantity)
Please note that the Max aggregation used is assuming that the max possible year is current year. Feel free to adjust as needed.
I hope this helps.
Simon
Hi,
Mistake,to check sales not in previous year,use below syntax:
=Sum({<Year={$(=Max(Year))},Year -= {'$(=Year(Today())-1)'}>} >} Sales )
or
=Sum({<Year={'$(=year(Today()))'},Year -= {'$(=Year(Today())-1)'}>} >}Sales)
or
=SUM({$<Date = {'>=$(=YearStart(Today()))<=$(=MonthEnd(Today()))'},Year -= {'$(=Year(Today())-1)'}>} >}Sales)
Regards
Neetha
Hi Simon Calzada
Can you Please Explain me How this P() function Works, if you provide any Detailed Doc on P() it will be helpful for me .
Thanks
John
P() selects all possible values of the field => white/green
E() selects all excluded values => grey
Dear John,
Here is an expression, please check.
Current Year Sales Expression:
=Sum ({$<Year = {$(=Only (Year))}>} Sales)
Kind regards
Ishfaque Ahmed
Hi Jonas Heisterkamp,
Can you Please explain me with an example where it is useful, where can we use it.
Regards
John