Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannagr
Creator III
Creator III

set analysis multiple conditions

Hello everyone,

 

I've been struggling with set analysis for some time now so I thought I'd ask you in hope you can help me out.

I need to count the donors who :

- have at least two different donation dates

- max(donation date) within the last 12 months

- last and previous donation must be within last 24 months

- there is a unitnumber available for each donor with the above criteria

 

and I am kinda lost. I have tried several thoughts on this but none works.

 

Thank you in advance,

Ioanna.

 

 

Labels (2)
11 Replies
tresesco
MVP
MVP

You might have spent some time trying out different ways. I suggest you to spend a bit more time to create a sample app (if not already there) and share to work on. 

ioannagr
Creator III
Creator III
Author

Sure. Maybe I thought i'd make it an expression with count If instead.

count(distinct (If( not isnull(unitnumber)) and (count(distinct(donationdate>=2) and interval(max(donationdate)-(max(donationdate)-1),'m')<=24 and max(donationdate)..?.   , donors )

 

 

As for max(donationdate) belonging in the last 12 months I don't have a solution. Maybe addmonths?

Any thoughts? I am quite new to qlik and trying to learn. You are helping a lot !

tresesco
MVP
MVP

Here you might have to learn Set Analysis.

ioannagr
Creator III
Creator III
Author

So is my expression completely wrong?

tresesco
MVP
MVP

Not necessarily. However, there are many things you have to take into consideration while writing an expression for solving a issue/query, like - selection state, object where the output is expected, ... Once you have everything clear in requirement/mind you can start writing/thinking about the expression. Since you have started learning, I would suggest to create a sample app and work on that - starting from writing simpler query solving expression to slowly moving towards more complex ones. 

ioannagr
Creator III
Creator III
Author

This is what I am trying to do. Can you help me out with  what I should do with this condition "max(donationdate) belonging in the last 12 months"  and maybe I can figure the rest out.

 

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,
You probably will get answers if you upload a sample file along with the expected result.

 

ioannagr
Creator III
Creator III
Author

Okay but how do I do that?

 

Gabriel
Partner - Specialist III
Partner - Specialist III

Maybe take a subset of the data you have, ensure it meets all expected result and either upload it here or work on it as @tresesco suggested.