Query and exclude (is there a NOR option)
Hi folks, I'm 2.5 weeks into the job here and trying to get through some query work.
I was trying to look at people who had donated to an Appeal up until a certain point.
I can say AppealID = X and Gift Date = [range_A→B]
But that would bring up people who may still be giving… so AppealID = X and Gift Date = [range_C→D] …
So those 2 subsets…
rangeA→D SUBTRACT range_C→D
I could make 2 different queries… export them and then in Excel do a comparator to notice the differences, but any way in one query/export?
Thanks (probably something simple and I'm just over thinking it)
Comments
-
@Ryan Moore You shouldn't need to do this in Excel. I usually try to accomplish this type of thing in Query List (Database view function not webview) if possible, but if you can't do it via a subtraction there, you can merge two queries in RE and use a NOR option.
0 -
@Ryan Moore - Here's a helpful guide for merging queries in Database View with diagrams of the available operators, no need to export to excel just yet.
2 -
@Ryan Moore
I think you really are overthinking it.first of all.. you are simply looking for gifts from a certain ONE appeal, simple enough.
Then it is the date range, you have 4 variables used in your date range: A, B, C, D. if you get clear on what exactly it is you want out of the date range, then it's likely a simple query.
You mentioned:
range A to B
range C to D (this is where it is unclear, is C after B or before)
finally you mention A to D subtract C to D.Assuming you didn't have a typo:
if:
A=2/5
B=2/10
C=2/15
D=2/20
where C is later than B
THEN your date range is just 2/5-2/14, that's ONE date criteria range using:
“Gift Date” between 2/5 and 2/14
OR you can do TWO date criteria using:
“GIft Date” is on or after 2/5
AND “Gift Date” is before 2/15if:
A=2/5
B=2/10
C=2/8
D=2/20
where C is actually earlier than B
THEN your date range is just 2/5-2/7.0 -
@Christine Robertson & @austen brown
thanks, didn't know about ‘merge’ (just finishing up my 3rd week here)
What I'm trying to find is the employee givers who gave up to a certain point, and stopped giving after a certain point
So what I did is made 2 queries
All time & Post time
So ‘all time’:
- Constituency Code NOT = past employee
- & ( Appeal ID = Employee Giving & Gift Date greater than 01/01/2013)
For Post
- Constituency Code NOT - past employee {want to make sur they didn't stop because they're now retired}
- & ( Appeal ID = Employee Giving & Gift Date greater than 01/01/2020)
The hope is that We find donors who have given since 2013, and then donors who've given since 2020. The exclusion list of it should be people who gave in 2013 up until 2020 but weren't in the list of 2020 and beyond.
I ran a merge using XOR (seemed the best way to subtract), but getting 0 hits
0 -
@Ryan Moore
If i'm understanding you correctly, you want list of constituent who gave to certain appeal within a date range but want to remove those that is giving in another range.Constituent Query:
Summary of Gift Amount (sub-criteria: appeal=XXX gift date: Between 1/1/2013-12/31/2019) greater than $0
AND
Summary of Gift Amount (sub-criteria: appeal=XXX gift date greater than or equal to 1/1/2020) equals to $0
AND
Constituent Code criteria1 -
@Christine Robertson
thanks folks, didn't know about the query merge feature (did I mention - newbie… just finishing week 3)So what I really want to do is find a list of employees people who gave up until a point, and then stopped giving
What I did was 2 queries ‘givers since A’ and then ‘givers since B' (which is after A)
First
- Constituency Code NOT= past employee {don't want to find out they stopped because they retired}
AND ( Appeal ID = Employee Giving AND Gift Date greater than A )
Then
- Constituency Code NOT= past employee
- AND ( Appeal ID = Employee Giving AND Gift Date greater than B )
From these did that Query Merge
First Query XOR Then Query … what it should be doing (if I'm guessing right) is find all those who have given from A, but then subtract those who have given from B (i.e. they were in A, but also in
.So let's say I pick Jan 1 2013 and Jan 1 2020
If anybody gave any time after Jan 1 2013, but then also gave after Jan 1 2020 they should be excluded…
0 - Constituency Code NOT= past employee {don't want to find out they stopped because they retired}
-
@Ryan Moore If I'm understanding your end objective correctly, I think what you could do is add the first query that you mentioned to a Query List. Then, if you want to remove those who stopped giving prior to 2020, you could create a second query of Last Gift Date before 12-31-20. In Query List, you can use the Remove function to subtract those in the second query from the starting query.
0 -
No need for merge query, just one Constituent Query:
Summary of Gift Amount (sub-criteria: appeal=XXX gift date: greater than 1/1/2013) greater than $0
AND
Summary of Gift Amount (sub-criteria: appeal=XXX gift date greater than or equal to 1/1/2020) equals to $0
AND
Constituent Code criteria1 -
hey everybody… thanks for all the responses… was able to chat with our office colleagues, turns out what I was missing was using the right “Appeal ID”, it's a field in a couple spots and I was using the Assigned Appeal ID, meaning they've responded to a specific campaign (turning the lingo), versus the gift we received as assigned what appeal ID.
/d'oh
0 -
@Ryan Moore - I'm glad you figured it out!
0
Categories
- All Categories
- 6 Blackbaud Community Help
- 213 bbcon®
- 1.4K Blackbaud Altru®
- 403 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.2K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 656 Blackbaud Grantmaking™
- 577 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 940 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.7K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 249 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 241 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 796 Community News
- 3K Jobs Board
- 54 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)



