Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
andreacossu1
Contributor
Contributor

Double assignment

Hi All!

 

I have an app loading my data as it should and now I would like to display it in a table. When I write the conditions for each row in the table, it gets the matching data assigned. Now, the problem I have is that each data value can only be assigned to one and only one row. So for example if a data value needs to be assigned in theory to rows 1 and 2, depending on the order of the code it will either be assigned to row 1 OR (exclusive) row 2. However, I need it to be assigned to both. How can that be done in the table interface (Basically I have written a code for the a dimension in Qlik sense which displays the table itself. How can this be modified s.t. a value can be assigned to two (or more) lines.)?

5 Replies
Gysbert_Wassenaar

Can you give an example with data? I have no idea now what you're actually trying to do.


talk is cheap, supply exceeds demand
swallace104
Contributor III
Contributor III

I'm assuming you know that the rows you want the value assigned to are related? If so then you could just create a key that defines that relationship. So you create _GroupingKey with a unique value for each row set. Each row in your dataset gets its corresponding _GroupingKey and you assign the value to the _GroupingKey instead of the row. You can either keep a seperate table with just the _GroupingKey and its proper value or map the value into every row in the dataset via the _GroupingKey. Then it's just a matter of using that value in your table. 

andreacossu1
Contributor
Contributor
Author

Seems promising to me. Will try that and then get back to you. In the mean time, I have posted more information on the problem in the thread as a reply to the first contributor to the post. 

andreacossu1
Contributor
Contributor
Author

Example of data:

 

Item 1 – Color : Red ;  Height : 1.51m ; Mass : 25kg ; Value : 105

Item 2 – Color : Blue ;  Height : 1.51m ; Mass : 25kg ; Value : 200

 

Row 1 Conditions – Color: All ; Height : All ; Mass: All

Row 2 Conditions – Color: Red ; Height : Above 1.5m ; Mass : All

Row 3 Conditions – Color: Blue ; Height : Above 1.5m ; Mass : All

 

So then the values should be the following:

 

Row 1 – Value : 205

Row 2 – Value : 105

Row 3 – Value : 200

 

The interface I am using is the following (See attachment). The code is written in the first dimension.

 

Thanks a lot,

 

Best

Gysbert_Wassenaar

Still don't get it. Can you post a small QS app with example data that demonstrates the problem?

talk is cheap, supply exceeds demand