Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Excluding same values from column directly with code

Hi all,

I have this table and I need to automatically exclude some values ​​from the column Db_User_Name. And I would like to do it directly in the code. For example, I would like to exclude the two values: NT AUTHORITY\SYSTEM and DBSNMP.

Can you help me please?

 

exclude.jpg

 

 

Labels (2)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Excluding same values from column directly with code

 Remove the first row.

Use only

If(match(Db_User_Name,'NT AUTHORITY\SYSTEM', 'DBSNMP')=0,
Db_User_Name,
Null()
)

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

8 Replies
Highlighted

Re: Excluding same values from column directly with code

Hi

I think you can use the Drop Fields() take a look here... https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/ScriptRegularStatements/...
I don't sure but I think you can use "where" with drop fields, try it.

I hope this was help you.

Highlighted
Contributor II
Contributor II

Re: Excluding same values from column directly with code

Hi @walxiney_Planner 

thanks for the reply. Maybe I didn't write well. I would like to automatically filter some values ​​using the function.
I'm not sure if the drop command is the right one or am I wrong?

 

function.jpg

Highlighted
Partner
Partner

Re: Excluding same values from column directly with code

Try this:
If(match(Db_User_Name,'NT AUTHORITY\SYSTEM', 'DBSNMP')=0,
Db_User_Name,
Null()
)
Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Contributor II
Contributor II

Re: Excluding same values from column directly with code

garbage.jpg

Highlighted
Partner
Partner

Re: Excluding same values from column directly with code

 Remove the first row.

Use only

If(match(Db_User_Name,'NT AUTHORITY\SYSTEM', 'DBSNMP')=0,
Db_User_Name,
Null()
)

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

Highlighted

Re: Excluding same values from column directly with code

The response of Vegar is correct

Use just the

If(match(Db_User_Name,'NT AUTHORITY\SYSTEM', 'DBSNMP')=0,
Db_User_Name,
Null()
)

Don't need the first line  😊.

Highlighted
Contributor II
Contributor II

Re: Excluding same values from column directly with code

Thank you @Vegar ,  this is not the first time that you help me!!!

Highlighted
Partner
Partner

Re: Excluding same values from column directly with code

Glad to be of help 💁
Plees ekskuse my Swenglish and or Norweglish spelling misstakes