Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Straight Table - Issue with un associated tables

I have 2 tables which are not associated to one another but have the same dimension values.


I would like to display the sum of values for second table with respect to first table dimensions:

* INLINE [

    A, B, C

    A1, B1,11

    A2, B2,21
A3, B3,31

]
;





LOAD * INLINE [

    X, Y, Z

    A1, B1,10

    A2, B2,20

    A3, B3,30

]
;

The result must be, even when selections(B=B1) are made:

A=Sum(Z)
-
A110
A220
A330

But the result when B =B1 is

A=Sum(Z)
-
A110
A2
A3
8 Replies
jerem1234
Specialist II
Specialist II

Try this:

pick(match(only({1}A), 'A1', 'A2', 'A3'), Sum({1<X={'A1'}>}Z), Sum({1<X={'A2'}>}Z), Sum({1<X={'A3'}>}Z))

Hope this helps!

Not applicable
Author

Hi Kurpat,

Unfortunately that doesn't work it still give me the undesired result, which I was talking about.

Please post me the app if it worked for you.

jerem1234
Specialist II
Specialist II

Here it is. Please find attached.

Hope this helps!

Not applicable
Author

It doesn't seem to work after reload

sundarakumar
Specialist II
Specialist II

Pick could be not very handy, when u r going for more number of dimension data. Let us know what data model u have now and what u want to achieve. may be we can help in some other way to fix it...

-Sundar

Not applicable
Author

I have an island table in my application which is being used as the data in the main table is getting reduced due to data reduction.

So whenever I show values in the straight table, I am using a series of if conditions to check whether the dimension in actual table is equal to that of island table and then evaluating the expression.

But if some of the values are greyed out due to certain selections, I am unable to access those dimension in the expression column.

Want to access those greyed out dimension values also in my expression.

Not applicable
Author

This is against the rules of qlikview association. May be this doesn't work

jerem1234
Specialist II
Specialist II

Hmmm i see what you mean. That is odd behavior. It seems like it reduces the set to what you have selected when you hit the reload button. Undoubtedly its caused by the data model (since there is no link between the field Z and field A). But whether or not it should be doing that, I do not know.

What might be easier, is just use the fields X and Z in the straight table. Not sure where the field A comes into play, cause it seems like you want to ignore selections. But if you want to incorporate A in there somehow, it may be easier just to add that logic to the table with fields X and Z instead.

Other resolutions may come from doing things in the loadscript and then dashboard, but I do not know what you are doing in your real solution so I can't say for sure. If you wish to attach an example that better resembles what you are doing in your solution, we can maybe take a look at it.

Hope this helps!