Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to get Sum of amount for current month and current year.
Sum({1<[DonationDate.autoCalendar.Month]={'$(=Month(Today()))'}*[DonationDate.autoCalendar.Year]={"$(=Year(Today()))"}>}Amount)
OR
Sum({1<[DonationDate.autoCalendar.Month]={'$(=Month(Today()))'},[DonationDate.autoCalendar.Year]={"$(=Year(Today()))"}>}Amount)
Its not working. If I use only Month then I get some value but if I use both then it returns nothing.
Also tried using , instead of *.
I am not getting whats wrong in above code.
Operators are used while combining two sets.
OR -> +
AND -> *
In general,
Sum({<Set1>+<Set2>} Amt)
Sum({<Set1>*<Set2>} Amt)
In your case , should work.
=Sum({1<[DonationDate.autoCalendar.Month]={"$(=Month(Today()))"},
[DonationDate.autoCalendar.Year]={"$(=Year(Today()))"}
>}Amount)
maybe this:
=Sum( {1< [DonationDate.autoCalendar.Month] = {"$(=Month(Today()))"}, [DonationDate.autoCalendar.Year] = {"$(=Year(Today()))"} >} Amount )
Are you trying to get the sum of the month and the year?
In that case you could do Sum({1<[DonationDate.autoCalendar.Month]={'$(=Month(Today()))'}>}Amount) + Sum({<[DonationDate.autoCalendar.Year]={"$(=Year(Today()))"}>}Amount)
Apologies if I misunderstood your requirement.
keep in mind that that OR / AND in set analysis can be achieved by using you modifiers with * / + example:
Sum({<Unit = {'B'}>*<Warehouse = {'A'}>}Amount)
Operators are used while combining two sets.
OR -> +
AND -> *
In general,
Sum({<Set1>+<Set2>} Amt)
Sum({<Set1>*<Set2>} Amt)
In your case , should work.
=Sum({1<[DonationDate.autoCalendar.Month]={"$(=Month(Today()))"},
[DonationDate.autoCalendar.Year]={"$(=Year(Today()))"}
>}Amount)
Thanks everyone.
Sum({1<[DonationDate.autoCalendar.Month]={'$(=Month(Today()))'},[DonationDate.autoCalendar.Year]={"$(=Year(Today()))"}>}Amount)
Above worked.
And I did not reload data after I did some changes to data. Hence was unable to get result.