Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
sskiggs1
Contributor III
Contributor III

If statement set analysis in Listbox

I have this set analysis if statement:

=if(sum({<USE_DESC_TYPE={"Gross Requirements Amt"}>}PERIOD_VAL) >0, 'Yes', 'No')

It works perfectly in a text box. However, It will not work in a listbox, or multibox, or anything which will display it as a selection.

Any ideas?

Thanks.

1 Solution

Accepted Solutions
Chanty4u
Champion III
Champion III

ok try

=aggr(if(sum({<USE_DESC_TYPE={"Gross Requirements Amt"}>}PERIOD_VAL) >0, 'Yes', 'No'),PERIOD_VAL)

View solution in original post

8 Replies
tresesco
MVP
MVP

Try adding 'total' like:

=if(sum(TOTAL {<USE_DESC_TYPE={"Gross Requirements Amt"}>}PERIOD_VAL) >0, 'Yes', 'No')

Chanty4u
Champion III
Champion III

may be

=if(aggr(sum({<USE_DESC_TYPE={"Gross Requirements Amt"}>}PERIOD_VAL) >0, 'Yes', 'No'),PERIOD_VAL)

sskiggs1
Contributor III
Contributor III
Author

Only Returned 'Yes' and no 'No' even though there are results which fit under no

sskiggs1
Contributor III
Contributor III
Author

this displayed a blank list box

pooja_prabhu_n
Creator III
Creator III

Hi,

try creating in the script

T1:

Load * Inline [

USE_DESC_TYPE,PERIOD_VAL

Gross Requirements Amt,10000000

B,200000000

C,30000000

D,60700000

E,50000000

]

;



T2:

Join

load USE_DESC_TYPE,

if(USE_DESC_TYPE='Gross Requirements Amt',if(Sum(PERIOD_VAL)>0, 'Yes'), 'No') as listbox

Resident T1

Group By USE_DESC_TYPE;

tresesco
MVP
MVP

In text also you must be getting either yes or no, but not both, right? With one data set in scope you can't have both outputs possible. There has to be at least one dimension for that. You can then try like:

=Aggr(if(sum( {<USE_DESC_TYPE={"Gross Requirements Amt"}>}PERIOD_VAL) >0, 'Yes', 'No') , <YourDimension>)

Chanty4u
Champion III
Champion III

ok try

=aggr(if(sum({<USE_DESC_TYPE={"Gross Requirements Amt"}>}PERIOD_VAL) >0, 'Yes', 'No'),PERIOD_VAL)

View solution in original post

sskiggs1
Contributor III
Contributor III
Author

Perfect, Thank you!