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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
marissap
Contributor
Contributor

How to get a button to get a table to display nothing?

Hello! I have a dataset that contains SSNs from one database and then SSNs from the other database. I want create a button that shows me the SSNs that are different from each other (i.e. SSN in database 1=123456789 and then SSN in database 2=234567891). I created a variable that says "TRUE" if they are the same and "FALSE" if they are different and I have zero false values. I want someone to be able to click the button and see that all the SSNs match but it seems like Qlik does not allow a table to be blank. Has anyone experienced this before? Thank you. 

5 Replies
stevejoyce
Specialist II
Specialist II

Can you share your variable calculation and a screenshot?

marissap
Contributor
Contributor
Author

Here is the calculation I did in SAS, basically saying say "true" if they are both non-null but do not match each other. I got all of them to be false but I need the button so the user of this app can verify that they are all false:

DATA MATOUT.FINAL_MATRIX_3;
set MATOUT.FINAL_MATRIX_2 ;
if DRIVER_SSN_1<>'' and DRIVER_SSN_2<>'' and DRIVER_SSN_1<>DRIVER_SSN_2THEN MISMATCH_NOT_NULL='TRUE';
else if MISMATCH_NOT_NULL='FALSE';
RUN;

marissap_0-1636638518284.png

Button says to select the false values but we do not have any false values and I want a blank table but qlik will not display it. When I click the button nothing happens. 

stevejoyce
Specialist II
Specialist II

ok that makes more sense.  I would say easiest is to concatenate a placeholder record in your data model that this button can select into.

concatenate(table)

null() as DRIVER_SSN_1,

null() as DRIVER_SSN_2,

'NO_MISMATCHES' as MISMATCH_NOT_NULL

autogenerate(1).

 

Your button value expression can be,

if(count({<MISMATCH_NOT_NULL = {'FALSE'}>} MISMATCH_NOT_NULL), 'FALSE', 'NO_MISMATCHES')

 

then it will only display this placeholder record. 

 

if you don't want it to display even this placeholder record, then update your table expressions to not show, something like...

if(count({<MISMATCH_NOT_NULL -= {'NO_MISMATCHES'}>} MISMATCH_NOT_NULL), <your expression>)

marissap
Contributor
Contributor
Author

Thank you so much for your quick response. I am not sure if I am understanding correctly but I tried joining my data with a column that was just full of null values (see photo):

marissap_0-1636655418930.png

To my understanding the buttons cannot do counts, only KPIs can. I really just want to be able to click a button that will give me a table of nulls. 

 

stevejoyce
Specialist II
Specialist II

I didn't follow your last post.  But...

1) your button value fx (expression) can do count.

2) your action is to select a field value, you cannot select null.