Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
hkg_qlik
Creator III
Creator III

Restrict Data in a Straight Table

Hi,

I have a straight Table as following:

DivisionBranchAccount No.CustomerDaily SalesTonsGross ProfitGrs Pft/TonMTDYTD
A1601ABC1,00021,13899.003,2103,210
B2849EFG3214228100.00321321
C3294HIJ840567111.001,6081,608
D4806LMN449336222.001,3461,346
E5171OPQ325524144.001,1951,195
A1271RST1,20011,86766.0055,80255,802
B2391UVW00413120.0010,07510,075
C3573XYZ00311121.00870870

I want to restrict the data by : Daily Sales Column >1000 and Grs Pft/ Ton < 99.00

Thanks,

H

4 Replies
Anonymous
Not applicable

If you want to do this in the load script you can try to add something like the next line to your load:

WHERE [no.Customer] >1000 AND [Grs Pft] <99;

Not applicable

Use Calculated Dimension

if([Daily Sales Column] >1000,[Daily Sales Column])

if([Grs Pft]/Ton <99.00,[Grs Pft]/Ton)

enable Suppress when value is null

Try if this works

pover
Partner - Master
Partner - Master

In every column you have to put if((Daily Sales Expression) >1000 and (Grs Pft/ Ton Expression) < 99.00, (Column Expression)) which will return null if the requirements are not met and QlikView will by default suppress rows with all null values, or by ticking the option "Suppress Null Values" in the presentation tab.

To save time and effort you can put the conditions of the if statement in a variable. For example, the variable vCondition could be

(Daily Sales Expression) >1000 and (Grs Pft/ Ton Expression) < 99.00

And in every column expression put

if($(vCondition), Column Expression)

Regards.

pover
Partner - Master
Partner - Master

If you would do it with calculated dimensions, you have to use the aggr() function like the following example:

aggr(if([Daily Sales espression] >1000 and [Grs Pft/Ton expression] < 99,[Daily Sales Column]),Division,Branch,[Account No.])

although I don't recommend ever using calculated dimensions unless it is absolutely necessary.

Regards.