Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to exclude data in QV?

Hello!

I'm a beginner in QV but I know some SQL.

In my companys QV-file we read in all datas from our system.
But when I will extrakt the datas I would like as similar result as if I  had used "SELECT * FROM DB WHERE data_field NOT 'value1'".

What I got right now is "sum(Utfall_Belopp)" and I have a lot of info in my QV that I have to un-select.

Anyone that please can help me with a nice script.

//

1 Solution

Accepted Solutions
DavidFoster1
Specialist
Specialist

You need to have a look at SET ANALYSIS. Your SUM expression would be something like

SUM({$<[the field you want to exclude on] -={'value1','value2',etc}>} Utfall_Belopp)

View solution in original post

11 Replies
alexandros17
Partner - Champion III
Partner - Champion III

There is EXISTS instruction, take a look to the Help ...

Hope it helps

tresesco
MVP
MVP

You can run the same SQL command in qv, like:

SQL SELECT * FROM DB WHERE data_field NOT 'value1 ;

sudeepkm
Specialist III
Specialist III

you can use Match and wildMatch functions to filter out those records as per your requirement.

For example:

Load Name, ID, Addr, Region from Table where not match(Region,'NAMR','LAMR') ;

DavidFoster1
Specialist
Specialist

Are you talking about excluding in the load script of your QVW (i.e. reading from a QVD) or excluding from your SUM expression?

Not applicable
Author

OK, will check that up. Thanks

Not applicable
Author

Exclude from the SUM-expression

DavidFoster1
Specialist
Specialist

You need to have a look at SET ANALYSIS. Your SUM expression would be something like

SUM({$<[the field you want to exclude on] -={'value1','value2',etc}>} Utfall_Belopp)

tresesco
MVP
MVP

Then try like:

sum({<data_field - ={'Value1'}>}Utfall_Belopp)

Not applicable
Author

OK, thanks all!

I will try your suggestions on exclude from the SUM-expression.
I didn't realy understood the guide in "QV11 for developers", QV is too new for me to have a free mind and a see how the script can be "manipulated". 😃