# New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

## Condition to filtrate data

Hi all,

I'm new to QW and have a straight table that sums the the cost of of all products over time. My question is if i somehow can enter a condition that lets me filtrate out all data for the sum(cost) expression below or above a sertain value, for example to only show all products that have a value of more than 300.000 and less than -300.000 in the straight table and what that expression would look like?

Best regards!

Tags (2)
1 Solution

Accepted Solutions
MVP

## Re: Condition to filtrate data

hope this is what your looking for

7 Replies
MVP

## Re: Condition to filtrate data

Try this:

If(fabs(Sum(Cost)) > 300.000, Sum(Cost))

MVP

## Re: Condition to filtrate data

hi try like this:

if(sum(cost)>300 or sum(cost)<-300, sum(cost))

Not applicable

## Re: Condition to filtrate data

hmm, cant get it to work, the deffinition looks like this:

({<Year={\$(vYear4)},Quarter={\$(vQuarter2)}>} Cost) - Sum({<Year={\$(vYear3)},Quarter={\$(vQuarter1)}>} Cost)

It calcs the variance between different quarters and i only want the <300.000 and <-300.000 values to show.

MVP

## Re: Condition to filtrate data

Hi Hampus,

apply the condition on the whole set of expression:

if(sum({<Year={\$(vYear4)},Quarter={\$(vQuarter2)}>} Cost) - Sum({<Year={\$(vYear3)},Quarter={\$(vQuarter1)}>} Cost)>300 or

sum({<Year={\$(vYear4)},Quarter={\$(vQuarter2)}>} Cost) - Sum({<Year={\$(vYear3)},Quarter={\$(vQuarter1)}>} Cost)<-300,sum({<Year={\$(vYear4)},Quarter={\$(vQuarter2)}>} Cost) - Sum({<Year={\$(vYear3)},Quarter={\$(vQuarter1)}>} Cost))

MVP

## Re: Condition to filtrate data

Try this:

If(fabs(Sum({<Year={\$(vYear4)},Quarter={\$(vQuarter2)}>} Cost) - Sum({<Year={\$(vYear3)},Quarter={\$(vQuarter1)}>} Cost)) > 300.000,

Sum({<Year={\$(vYear4)},Quarter={\$(vQuarter2)}>} Cost) - Sum({<Year={\$(vYear3)},Quarter={\$(vQuarter1)}>} Cost))

Best,

Sunny

Not applicable

## Re: Condition to filtrate data

Think i'm doing something wrong, it wont sort out the above or below values. Can't share the original files but made a mini-version of the original with very limited data but it shold roughly show what i wanna do. The values in this data dosen't come close to 300000 as a limit but anyways:P

MVP

## Re: Condition to filtrate data

hope this is what your looking for