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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
rduah4u
Contributor II
Contributor II

GetFieldSelection

I have two tables.

Points Table:

One consists of PersonalEmail, FirstName, LastName, EarnedPoints.

In the model this table has a Datekey Field.

Staff Table:

I have another table that consist of FirstName, LastName, JobTitle, Location.

 

I want to keep these table independent from eachother so that the Staff table is not affected by a selected DateKey.

 

i.e. I want to be able to select either FirstName or LastName in the Points table which will then filter based on FirstName or LastName and if a DateKey is selected then this should not impact the Staff Table, therefore it just maintains the names selected.

 

Is there a way I can do this using GetFieldSelection

e

Labels (1)
2 Solutions

Accepted Solutions
Sayed_Mannan
Creator II
Creator II

here you can use set analysis and GetFieldSelections in Qlik.

here is my approach:

// Points Table Expression
Sum({<FirstName = {"$(=GetFieldSelections(FirstName))"}, LastName = {"$(=GetFieldSelections(LastName))"}>} EarnedPoints)

// Staff Table Expression (Ignoring DateKey selection)

Sum({<DateKey = >} TotalStaff)

3. Steps to implement:
* you need to ensure FirstName and LastName filters are applied in the Points Table.
* use the above expressions in your respective charts or tables.
* verify that DateKey is not linked between the Points Table and the Staff Table in your data model.

I hope this help.

 

View solution in original post

chriscammers
Partner Ambassador
Partner Ambassador

You can ignore selections of particular fields by overriding the selections in Set analysis

Sum({<DateKey =>}EarnedPoints)

You can also override selections on an entire table by using a formula

Sum({<$(=Concat({1<$Table = {'Table1'}>}'[' & $Field & '] =',','))>}EarnedPoints)

View solution in original post

2 Replies
Sayed_Mannan
Creator II
Creator II

here you can use set analysis and GetFieldSelections in Qlik.

here is my approach:

// Points Table Expression
Sum({<FirstName = {"$(=GetFieldSelections(FirstName))"}, LastName = {"$(=GetFieldSelections(LastName))"}>} EarnedPoints)

// Staff Table Expression (Ignoring DateKey selection)

Sum({<DateKey = >} TotalStaff)

3. Steps to implement:
* you need to ensure FirstName and LastName filters are applied in the Points Table.
* use the above expressions in your respective charts or tables.
* verify that DateKey is not linked between the Points Table and the Staff Table in your data model.

I hope this help.

 

chriscammers
Partner Ambassador
Partner Ambassador

You can ignore selections of particular fields by overriding the selections in Set analysis

Sum({<DateKey =>}EarnedPoints)

You can also override selections on an entire table by using a formula

Sum({<$(=Concat({1<$Table = {'Table1'}>}'[' & $Field & '] =',','))>}EarnedPoints)