Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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().
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
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
Hello,
TableOld:
LOAD
A,
B,
C
FROM table
where STATE = 'old';
TableNew:
NoConcatenate LOAD
A,
B,
C
FROM table
where STATE = 'new';
This solution will create synthetic key.
use QUALIFY if you do this in script
I have tried it, but I get an error message in each column of the straight table. Can you please attach your example? Thanks.
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.
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.
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 😞