Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

How do you filter the data you want to charge in Qlik??

Hi,

I have the following in my initial script,

LOAD Año,

Mes,

Materiale,

[Qtà stk. val.],

[Valore stk. v.]

FROM

(ooxml, embedded labels, table is [Inventario mes]);

My intention is to charge only the Data that stisfies an expression such as:

[([Qtà stk. val.]!=0) & ([Valore stk. v.]!=0)]

How should i change the script to make Qlikview load ONLY the Data that satisfy the expression??

Thanks a lot for your time!!!!!!!

Tags (3)
1 Solution

Accepted Solutions
jsomsen
Contributor III

How do you filter the data you want to charge in Qlik??

Are you sure your 0 is stored as a zero?

Try this:

WHERE FABS([Qtà stk. val.]) < 0.001 AND FABS([Valore stk. v.]) < 0.001

8 Replies
jsomsen
Contributor III

How do you filter the data you want to charge in Qlik??

I think this is what you are after.

LOAD Año,

Mes,

Materiale,

[Qtà stk. val.],

[Valore stk. v.]

FROM

(ooxml, embedded labels, table is [Inventario mes])

WHERE [Qtà stk. val.]<> 0 AND [Valore stk. v.] <> 0;

Not applicable

How do you filter the data you want to charge in Qlik??

Hi,

The script still shows me lines where:

[Qtà stk. val.]



<> 0 AND [Valore stk. v.] <> 0

I think the problem is that this fields are loaded from few Monthly inventary files. I imagine the script looks if the total sum of [Valore stk. v.] & [Qtà stk. val.] is zero for all the months.

I would like to charge only the lines that satisfy the condition for every month, indiferently if the last month it's been or not satisfied.

Hope you understood me!!

Thanks again!!!!

vgutkovsky
Honored Contributor II

How do you filter the data you want to charge in Qlik??

Alberto,

The solution in the previous post should work for you. This does not aggregate, but will rather look at the row-level data and take all rows that satisfy the expression.

Regards,

Not applicable

How do you filter the data you want to charge in Qlik??

Hi!

I've tried the script you told me:

After running it, a object in my Inventory still shows me values for codes that satisfy the expression:

And i checked the values for the March file and is correct:

I think the object shouldn't show that Materiale on the march inventory. Also it affects other objects. Does someone know where the problem might be??

THANKS!!!!

jsomsen
Contributor III

How do you filter the data you want to charge in Qlik??

Are you sure your 0 is stored as a zero?

Try this:

WHERE FABS([Qtà stk. val.]) < 0.001 AND FABS([Valore stk. v.]) < 0.001

Not applicable

How do you filter the data you want to charge in Qlik??

I've tried with your way, and Qlikview shows me only the values with 0 & 0:

WHERE FABS([Qtà stk. val.]) < 0.001 AND FABS([Valore stk. v.]) < 0.001

To obtain what i really want i changed the expression to :

WHERE FABS([Qtà stk. val.]) > 0.001 AND FABS([Valore stk. v.]) > 0.001

Now it shows me all the values, zeros and != zero, as if the expression wasn't there!!! Incredible....

I don't have a clue about where the problem might be...

vgutkovsky
Honored Contributor II

How do you filter the data you want to charge in Qlik??

Well, hold on a second. You've introduced a new dimension to your chart that wasn't in your main table that you posted. I'm assuming this dimension is in another table that is linked to the first table on "Materiale." So if your "Nombre Materiale" table lists a "Materiale" that does not exist in your first table, the sum of your metrics will be zero. This is not because you have 0-value records in the first table, but because there is no matching Materiale. Make sense?

Regards,

Not applicable

How do you filter the data you want to charge in Qlik??

It makes plenty sense now!!

Thanks a lot!!

Community Browser