Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
PaoloGuerra
Creator
Creator

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 (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

 Remove the first row.

Use only

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

View solution in original post

8 Replies
walxiney_Planner
Partner - Contributor III
Partner - Contributor III

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.

PaoloGuerra
Creator
Creator
Author

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

Vegar
MVP
MVP

Try this:
If(match(Db_User_Name,'NT AUTHORITY\SYSTEM', 'DBSNMP')=0,
Db_User_Name,
Null()
)
PaoloGuerra
Creator
Creator
Author

garbage.jpg

Vegar
MVP
MVP

 Remove the first row.

Use only

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

walxiney_Planner
Partner - Contributor III
Partner - Contributor III

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  😊.

PaoloGuerra
Creator
Creator
Author

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

Vegar
MVP
MVP

Glad to be of help 💁