
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to use AND operator in Set Analysis?
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.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
maybe this:
=Sum( {1< [DonationDate.autoCalendar.Month] = {"$(=Month(Today()))"}, [DonationDate.autoCalendar.Year] = {"$(=Year(Today()))"} >} Amount )


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
