Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dreweezy
Partner - Creator II
Partner - Creator II

Variable button syntax check to show >60 day and <60 days

I have a table that includes a clientsID along with my 5 committees that will be approving along with their respective days out. Below is a snip of the spreadsheet.

Capture.PNG

Now my two buttons will have a syntax based on whether the Committee #1 - #5 have days > 60 and < 60 days. Upon pressing this button I would hope for the table to change.

My current syntax that needs some checks :

vCommittee is my variable and >60 days will be defined as 1 and else (2) is <60 days.

If(vCommittee=1,

count({<  [Committee 1 Days Out] > 60, [Committee 2 Days Out] > 60, [Committee 3 Days Out] > 60, [Committee 4 Days Out] > 60, [Committee 5 Days Out] > 60  }> } ,

count({<  [Committee 1 Days Out] < 60, [Committee 2 Days Out] < 60, [Committee 3 Days Out] < 60, [Committee 4 Days Out] < 60, [Committee 5 Days Out] < 60 }>})

I'm really looking for a syntax check as I am not getting results as expected. Any guidance would be much obliged.

1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

couple of things

1- the syntaxt for greater than 60 should be 

[Committee 1 Days Out] ={">60"}

2-  The way you constructed the set analysis mean your will get values for only Committee 1 Days Out] > 60 and [Committee 2 Days Out] > 60

if you need Committee 1 Days Out] > 60 or [Committee 2 Days Out] > 60

your will need to change like below

<[Committee 1 Days Out] ={">60"}>
+<[Committee 2 Days Out] ={">60"}>

hope it helps

close thread as answered if it helps

View solution in original post

6 Replies
dplr-rn
Partner - Master III
Partner - Master III

couple of things

1- the syntaxt for greater than 60 should be 

[Committee 1 Days Out] ={">60"}

2-  The way you constructed the set analysis mean your will get values for only Committee 1 Days Out] > 60 and [Committee 2 Days Out] > 60

if you need Committee 1 Days Out] > 60 or [Committee 2 Days Out] > 60

your will need to change like below

<[Committee 1 Days Out] ={">60"}>
+<[Committee 2 Days Out] ={">60"}>

hope it helps

close thread as answered if it helps
dreweezy
Partner - Creator II
Partner - Creator II
Author

I am still getting an error (error in expression)

Currently testing for just one expression. 

if(vCommit = 1, count([Commitee Days 1 Out] = {">60"} ))

dplr-rn
Partner - Master III
Partner - Master III

Your syntax is wrong.

Set analysis should be inside 

{<>}

Count({<...>})

 

dreweezy
Partner - Creator II
Partner - Creator II
Author

Not sure how Im still getting an error, but I'm checking every angle possible.

if(vCommit = 1, count{<([Committee 1 Days Out]) = {">60"}>})

dplr-rn
Partner - Master III
Partner - Master III

Your syntax is wrong again at the start
Count({<
dreweezy
Partner - Creator II
Partner - Creator II
Author

Ok that was a silly mistake on my end. Thank you again.