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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis for null value

Hi, I have a question about Set Analysis.

I want to calculate the number of first-time mom and non-first-time mom, the conditions are

1. First time mom : First born flag = Y and only has one due date

2. Non-first time mom : First born flag <> Y or has more than one due date

For first time mom, I wrote

=count({$Customer_First_Born_Flag ={Y}, Customer_Due_Date1={ }, Customer_Due_Date2= { }>} distinct Customer_Key), which didn't work.

But =count({$Customer_First_Born_Flag ={Y}>} distinct Customer_Key) worked!!

Why is that? Isn't { } represents null value? Please help please!!

Labels (1)
2 Replies
Not applicable
Author

I tried to do this, this didn't work either:

=



count({$<Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*}>

-$<







Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*},Customer_Due_Date2 = {*}>

-$<



Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*},Customer_Due_Date2 = {*}, Customer_Due_Date3= {*}>

-$<



Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*},Customer_Due_Date2 = {*}, Customer_Due_Date3 = {*}, Customer_Due_Date4 = {*}>

-$<



Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*},Customer_Due_Date2 = {*}, Customer_Due_Date3 = {*}, Customer_Due_Date4 = {*}, Customer_Due_Date5= {*}>

-$<Customer_First_Born_Flag = {Y}, Customer_Due_Date1 = {*},Customer_Due_Date2 = {*}, Customer_Due_Date3 = {*}, Customer_Due_Date4 = {*}, Customer_Due_Date5 = {*}, Customer_Due_Date6= {*}>

}



distinct Customer_Key)







Not applicable
Author

Hello,

I'm just wondering do the due dates really matter because you're flagging the first time moms with "Y" already.

First time moms:


=count ( distinct { $<Customer_First_Born_Flag = {"Y"} >} Customer_Key)


Non-First timers:


=count ( distinct { $<Customer_First_Born_Flag -= {"Y"} >} Customer_Key)


Do you need to count how many kids they have for the non first time moms? Then you will need to take the due dates into account.