Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ni_avoss
Creator
Creator

Expression: how to look up values from other table (not connected via data model) ?

Hi all,

I am a bit frustated now, because I am facing a problem which I am quite sure I figured out some time ago and should be possible but somehow I cannot get the right expression right now ...

so as a start, I want to get values from another table using an expression, not the datamodel (lets say, those tables are not connected)

table1:

A value1
15
26
37
48

table2:

C value2
110
211
312
4

13

what I would like to get:

A value1
value2
15 10
26 11
37 12
4813

so far I got for value2

=aggr(sum({<A={$(=C)}>}D),A)

which only return the sum of all value2 for all IDs

I am assuming I am missing something simple, am I right?

thanks and the best,

alex

2 Replies
marcus_sommer

It's not really recommended to make calculations over not associated tables. Why not simply connect them directly within the datamodel - even if you need to load one of these tables twice and rename fields here and there to avoid synthetic keys and circular references it's better as to handle loosen tables within the gui.

- Marcus

ni_avoss
Creator
Creator
Author

Hi Marcus,

yeah, I know that is not recommended.

Unfortunately I am working on an app with really complex datamodel and need to get some information here and there, which will not work with this datamodel. also, connecting the tables will not work due to circular references etc ... I would like to avoid making changes to the datamodel, but seems that this is necessary

thanks for your reply.

alex