Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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.

//

Tags (1)
1 Solution

Accepted Solutions
dfoster9
Valued Contributor

Re: How to exclude data in QV?

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)

11 Replies

Re: How to exclude data in QV?

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

Hope it helps

MVP
MVP

Re: How to exclude data in QV?

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

SQL SELECT * FROM DB WHERE data_field NOT 'value1 ;

sudeepkm
Valued Contributor III

Re: How to exclude data in QV?

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') ;

dfoster9
Valued Contributor

Re: How to exclude data in QV?

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

Highlighted
Not applicable

Re: How to exclude data in QV?

OK, will check that up. Thanks

Not applicable

Re: How to exclude data in QV?

Exclude from the SUM-expression

dfoster9
Valued Contributor

Re: How to exclude data in QV?

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)

MVP
MVP

Re: How to exclude data in QV?

Then try like:

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

Not applicable

Re: How to exclude data in QV?

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". =)

Community Browser