Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
MVP
MVP

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
MVP
MVP

may be

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

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
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
MVP
MVP

ok try

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

Anonymous
Not applicable
Author

Perfect, Thank you!