Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List Box Help

Hi Qlikviewers

Could somebody help explain to my why this list box on the attached file doesnt work??

Many Thanks
James

11 Replies
rbecher
MVP
MVP

Hi James,

you would need to aggregate, maybe this expression will help for the listbox:

=if(aggr(sum(Incurred), [Claim Number], [Claimant Type])=0,'C','O')


- Ralf

Astrato.io Head of R&D
Not applicable
Author

Hi Ralf,

Just for clarification,

When the if statement

=if(sum(Incurred)=0,'C','O') is used in the dimension. it is throwing the error and when used in the List Box Virtually it is not showing the data. But when used as expression it is working fine without using an aggreagtion. How does it works internally.



rbecher
MVP
MVP

I don't get your question. This expression is working in the Listbox expression. I've tried this on QV 10.

- Ralf

Astrato.io Head of R&D
Not applicable
Author

Hi Ralf,

I am using Qv9.

Consider the James QVW file itself,

=if(sum(Incurred)=0,'C','O') is used an expression and data was displaying.

And the same is used as

=if(sum(Incurred)=0,'C','O') in the list box it was not working. But your solution was working.I mean after adding the aggregation.

And just tried to used =if(sum(Incurred)=0,'C','O') as Dimension it was throwing error. So what is the role of Aggr in this expression.

Why the same statement works in the expression but not in Dimesion and the List box without adding aggr. After adding aggr it is working.why?

rbecher
MVP
MVP

XXX,

1. How QV can sum without a dimension (in a listbox)? How should it know which dimension to use?

2. You will understand this if you add a 'current selection' box. There you can see what selection QV is making if you click 'O' on the listbox. It selects the associated dimensions.

- Ralf

Astrato.io Head of R&D
Not applicable
Author

Thanks for your help Ralph

I think i need to play with the aggregation,as i have way more fields in my original cloud solution, i will give you a shout if i get stuck

Much Appreciated, James

Not applicable
Author

Hi Ralf

I can't seem to get it to work. the list box doesn't return the correct fields.

could you have a look at this please??

i have tried myself but am having trouble... I'm still getting used to this front end stuff.... my skills lie in the SQL part still !!

Thanks again

Not applicable
Author

Hello I have this

=



if(sum(Incurred)>1,'C','O')

Try that for your ListBox Expression... It looks like it worked something, but not sure if thats what you want.

ANDY

rbecher
MVP
MVP

James,

I see, this is not working with with a two dimensional aggregation. I think it could work if you would have both dimensions concatenated in one field:

[Claim Number] &[Claimant Type] as Dim

But a better solution could be an aggregation table with sum(Incurred) if you need this as selection.

- Ralf

Astrato.io Head of R&D