Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display Table contents related to particular selection out of 2

Hi Friends,

I will explain problem with an example.

e.g. I have list boxes - Department (A, B, C), Name (p,q,r,s,t,u,v,w,x,y), Attendance (1,2,3,4,5,6,7,8,9)

I also have a separate table having same 3 fields

If I select Department (B) from List box, Table will display Department B, Name q,r,s,t and Attendance 2,3,4,5.

If my next selection is Name r, Table will display Department B, Name r, Attendance 3.

This is what I don't want.

I want my table to be dependant only on Department selection and not any other field.

I hope problem statement is clear.

If any doubt, plz ask.

Hoping for your favourable responses soon.

Happy Thoughts

7 Replies
Not applicable
Author

Hi,

Qlikview applies the selection on top of the currently selected values. So, if you don't want to have the 'department' selection while selecting 'Name', you should use clear selection button to clear the department selection before selecting the 'name'

-Haneesh

Not applicable
Author

Hi Haneesh,

Thanks for responding.

What you are saying is right.

I want my first selection as "Department" always.

If, for any reason, somebody selects any other field - Name or Attendance,

I want table content to remain unchanged.

Not applicable
Author

You can use set analysis in the expression definition to ignore the other field selection.

e.g sum({<Name=,Attendance=>}sales)

The above expression will not include any selected 'Name' and 'Attendance' values for the calculation. You can use such expression to ignore all other selections except 'Department'

-Haneesh

Not applicable
Author

Hi,

That is a very good solution.

Yet, my actual data has more than 25 fields in it.

I wanted to find out better way of doing it.

In this manner, I will have to write all the possible fields in SET and if fields increase in future,

I will have to make sure that I have made changes everywhere.

I am in search of dynamic solution.

Not applicable
Author

Hi,

You can use one variable to write all possible values and use this variable in the set analysis definition.

ex. create a variable as follows

Variable name = vSetCalc
definition = ='{$<Department=,Name=>}'


Use this variable in the expression as follows,

=SUM($(vSetCalc) Sales)


So, in the above expression the sales value will be calculated excluing the 'Department' and 'Name' selections. Include all your excluded fields in this variable definition and use the variable in the expression. In the future, when you have to add/remove the fields, update only the variable and your expressions will get changed automatically. This will ease the maintenance.

Hope this resolves your issue.

-Haneesh

Not applicable
Author

Hi Haneesh,

That is a genius solution.

It worked perfectly.

Thanks a lot.

To give you little more trouble, just let me know

if you find out method of doing this without giving specifications (Department, Name etc.) even in variable form.

That will be full proof solution in my case.

Thanks anyways for above solution.

Happy Thoughts

Not applicable
Author

Hi,

Nothing strikes me other than this variable option.

Will let you know, if I find something.

Cheers Haneesh