Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add condition to script

Hello,

my Name is Kristian and i am new to qlikview.

I ve managed to work some things out by myself but now i need help. I hope to ask in the right place

2 Questions, same case but different approach:

1. Scriptview: My column Item is unique but "WITPRICELI" has more than one variables (A, B, C, ....). Is there a possibility to tell the script: Just give me from the table xxx all unique Items but only variable "A"?

LOAD

     Item,

     WITPRICELI (code?)

From

Y:\xxx.xlsx

(ooxml, embedded labels, table is xxx);

2. Sheetview: I dont change the scriptview and i am going to make a Table Box with the given variables. The Table box is now ugly because for every "unique" Item still pops up 3 times(different variables). Is it possible, and if where, to command the table: show me only variable "A"?

Given table now:

Item xx A

Item xx B

Item xx C

Item xxx A

....

Thats what i want:

Item xx A

Item xxx A

Item xxxx A

...

Thank you in advance for your help.

Greetings,

Kristian

1 Solution

Accepted Solutions
Jason_Michaelides
Partner - Master II
Partner - Master II

Hi Kristian,

Try:

LOAD DISTINCT

     Item,

     WITPRICELI

From

Y:\xxx.xlsx

(ooxml, embedded labels, table is xxx)

WHERE WITPRICELI = 'A';

Hope this helps,

Jason

EDIT - the following added:

The above code will mean only distinct Item numbers with a WITPRICELI of 'A' will be loaded at all.  If you want to load all data but choose to only display certain rows in a chart table you can remove the DISTINCT and the WHERE clause (all data will now be loaded) and then maybe have a simple listbox of WITPRICELI and select one of them.  You chart and table objects will then only show rows for the value you have selected.

OR!  You can load all data but force a chart to only use rows where WITPRICELI is 'A' by either using a dynamic dimension (e.g. =IF(WITPRICELI='A',Item) or set analysis in your expressions (e.g. Sum({<WITPRICELI={A}>} Sales)

View solution in original post

2 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

Hi Kristian,

Try:

LOAD DISTINCT

     Item,

     WITPRICELI

From

Y:\xxx.xlsx

(ooxml, embedded labels, table is xxx)

WHERE WITPRICELI = 'A';

Hope this helps,

Jason

EDIT - the following added:

The above code will mean only distinct Item numbers with a WITPRICELI of 'A' will be loaded at all.  If you want to load all data but choose to only display certain rows in a chart table you can remove the DISTINCT and the WHERE clause (all data will now be loaded) and then maybe have a simple listbox of WITPRICELI and select one of them.  You chart and table objects will then only show rows for the value you have selected.

OR!  You can load all data but force a chart to only use rows where WITPRICELI is 'A' by either using a dynamic dimension (e.g. =IF(WITPRICELI='A',Item) or set analysis in your expressions (e.g. Sum({<WITPRICELI={A}>} Sales)

Not applicable
Author

Thank you very much, that helped.