Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ingoniclas
Creator II
Creator II

Selective loading of data in table object

Hi there,

I want to load table objects with data from one table where every row is marked with either 'new' or 'old'. How can I filter the data so that one table object only loads the rows marked with 'new' or 'old', respectively?

Thanks,

Ingo

1 Solution

Accepted Solutions
christophebrault
Specialist
Specialist

Look at this file.

If you get an error, it can be because your dimension isn't at row level in your data. Only() can't work.

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin

View solution in original post

9 Replies
christophebrault
Specialist
Specialist

Hi,

I think you should use straight table to do this :

set dimension and in expression use : Only({$<Yourfield={'new'}>} Other field)

Add an expression for any field you want to add to your table.

Be carefull to have a very low level dimension to use only().

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
ingoniclas
Creator II
Creator II
Author

Hi Christophe,

Thanks for your reply. However, I didn't fully understand that. Where am I supposed to add expressions for any field I want to add to my table? Can you detail that a little furter, please?

Thanks,

Ingo

christophebrault
Specialist
Specialist

Ok ,

Lets say you have a table load in the script :

LOAD ID,

          DESCRIPTION,

          VALUE,

          STATE // this field contain new, old, or null() value

FROM ...

In the design interface, create a chart object (not table) and choose straight table.

As a dimension, i choose ID because i want to show the data a this level.

if i want to show DESCRIPTION I use this expression :

    

     Only({$<STATE={'new'}>} DESCRIPTION) // show only ID where STATE = new

     Only({$<STATE={'new','old'}>} DESCRIPTION) // show only ID where STATE = new or old

Then, you can add other expression to show VALUE, STATE ...

If you don't have a personnal edition, i can share an example if you need

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
Not applicable

Hello,

TableOld:

LOAD

     A,

     B,

     C

FROM table

where STATE = 'old';

TableNew:

NoConcatenate LOAD

     A,

     B,

     C

FROM table

where STATE  = 'new';

christophebrault
Specialist
Specialist

This solution will create synthetic key.

use QUALIFY if you do this in script

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
ingoniclas
Creator II
Creator II
Author

I have tried it, but I get an error message in each column of the straight table. Can you please attach your example? Thanks.

ingoniclas
Creator II
Creator II
Author

Thanks for the comment, but this is not what I had in mind. I want to have only one table to be loaded in QV, however, I want to separate this into 2 straight tables in the document.

christophebrault
Specialist
Specialist

Look at this file.

If you get an error, it can be because your dimension isn't at row level in your data. Only() can't work.

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
ingoniclas
Creator II
Creator II
Author

Now I got it and it worked. Thanks a lot for your help! ...Just too bad that you can't use the drop down options with the formulas 😞