Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
aj_954
Contributor III
Contributor III

Cross Filtering - Assign Data to a single Variable

I have a quick QLIK question I was hoping you can help me out with regarding the QLIK Desktop data load editor.

I am looking to create a dashboard that includes a “single drill” down. I need to take given data and assign them to a single group, using the QLIK load editor

A “dummy” set of data is below to better explain what I am trying to do:

FULL DATA SET

Sender

Receiver

Group Sender

Group Receiver

A

B

2

3

B

A

4

1

C

E

4

5

D

F

2

1

E

B

3

1

A

C

3

4

D

F

4

1

I want to create a new variable called “group” that takes two inputs, Group Sender & Group Receiver and combines the group sender and group receiver variable into the new variable group.

The logic is :

If (Group Sender == 3 OR Group Receiver ==3)

{

Return all rows that have Group Sender or Group Receiver == 3 and assign them to group value = 3

}

For example, if the user selected the new variable (group) value is 3, the following would be returned:

Sender

Receiver

Group Sender

Group Receiver

New Variable

(Group)

A

B

2

3

3

E

B

3

1

3

A

C

3

4

3

Hopefully, this makes sense and you are able to help!

Let me know if you can!

Labels (1)
1 Reply
justISO
Specialist
Specialist

Hi, if no one will suggest other and better solution, my way to achieve this would be to create simple variable (you can change it in front end with variable input) and your sample data in load script:

LET vGroup = 3;

sample:
load * inline [
Sender, Receiver, Group Sender, Group Receiver
A,	B,	2,	3
B,	A,	4,	1
C,	E,	4,	5
D,	F,	2,	1
E,	B,	3,	1
A,	C,	3,	4
D,	F,	4,	1];

and in report level just create dimension with yours already described logic:

=if([Group Sender]=$(vGroup) or [Group Receiver]=$(vGroup), $(vGroup) )

call it 'Group' and uncheck 'Include null values'. Done:

justISO_0-1669882104346.png