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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
stekol61
Creator
Creator

Exluding data in script

Hi!

I'm loading the dimentions below and want to present them in a report/graph.

When I select e.g. Country='S' I want to exclude the Hosts containg 'LAB'.

I also need to have the possibility to see the LAB-Hosts. E.g. by usiga a Dummy 'Country' ='LAB'

Not sure what's the best way to solve this,. In the scipt or in the report

 

 

WeekCountryHostName
31FPM1
31FPM2
31FLAB
31NPM3
31NPM4
31NLAB2
31SFRE2P
31SHY2P
31SLAB3P
31SLAB4P
20 Replies
Anonymous
Not applicable

Hi Stefan,

Can you please try below code in Script editor:

Test 3:

Load Week,

If(WildMatch(HostName,'LAB*','LAB',Country) as Country,

HostName;

Load * Inline

[

Week, Country, HostName

31, F, PM1

31, F, PM2

31, F, LAB

31, N, PM3

31, N, PM4

31,N, LAB2

31, S, FRE2P

31, S, HY2P

31, S, LAB3P

31, S, LAB4P

];

Output :

Anonymous
Not applicable

Syntax mistake.. Please find correct one as below:

Test 3:

Load Week,

If(WildMatch(HostName,'LAB*'),'LAB',Country) as Country,

HostName;

Load * Inline

[

Week, Country, HostName

31, F, PM1

31, F, PM2

31, F, LAB

31, N, PM3

31, N, PM4

31,N, LAB2

31, S, FRE2P

31, S, HY2P

31, S, LAB3P

31, S, LAB4P

];

senpradip007
Specialist III
Specialist III

Have look at this sample app. Hope it will help.

bharani8
Creator III
Creator III

Here you go..

stekol61
Creator
Creator
Author

Thank you

bharani8
Creator III
Creator III

Wc! Please mark it as Correct  so it will be useful for others while searching for this

stekol61
Creator
Creator
Author

Done

/Stefan

bharani8
Creator III
Creator III

Haha.. You hav marked the wrong one as Correct

stekol61
Creator
Creator
Author

Oops.

Should be OK now

Anonymous
Not applicable

Hi Stefan,

You have asked for a solution like below:

Hi!

If I select "S" the report should look like this:

Week          Country            HostName

31                    S                    FRE2P

31                    S                    HY2P

If I select the "Dummy" Country 'LAB' I want to see all hosts containg the name 'LAB'

Whare to i use the set modifier in my?expression

But the correct answer you marked doesnt have solution for your second question. Am i right?