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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
terrusie
Contributor II
Contributor II

Filter List Box

Hello.

I've got a set of data that looks like this:

NameRoomMinutes
John11
Mary25
Jim111
Mary16
John15
Jim28
John22
Mary23
Mary17
Jim23

I need a field expression for the list box such that the list box only displays the Names that have spent more than 10 total Minutes  in Room 1.

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

If(Aggr(Sum({<Room={1}>}Minutes),Nmae)>10,Name))

View solution in original post

4 Replies
sasiparupudi1
Master III
Master III

If(Aggr(Sum({<Room={1}>}Minutes),Nmae)>10,Name))

terrusie
Contributor II
Contributor II
Author

That did it.

Thank you!

Set expressions are something I have yet to master.  The syntax trips me up regularly. Do you know of a tutorial on this that can show me a wide range of examples?

vishsaggi
Champion III
Champion III

I am sure you might have tried what Sasidhar proposed and is an easiest way too. However, another way of getting your names is like try below: Just creating a new Field you can use in the listbox.

Room:
LOAD Name,
Room,
Minutes
FROM
[https://community.qlik.com/thread/296629]
(
html, codepage is 1252, embedded labels, table is @1);

LEFT JOIN(ROOM)
Final:
LOAD Name, IF(Sum(Minutes) > 10, Name) AS FilteredName
Resident Room
Where Room = 1
Group By Name;

terrusie
Contributor II
Contributor II
Author

Thank you.

I will keep this in mind.  It will likely help with other data sets I have where I can use the same condition in multiple objects.