# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

New Contributor III

## Multiple Criteria in Sum expression

Hello everybody,

Please support with the bellow issue:

in Visualization I need to see percentage of data  with the condition Aging> than 89 days, and I have the formula, which is not correct working, it`s showing only 1, like I dont have filter [Aging]={'>89'}:

sum({<[Aging]={'>89'}>}Amount.Loc)/Sum([Amount.Loc])

But all data is in Raw data table is correct with aging.

I tried to make the formula in script: sum(If(Aging>89,([Amount.Loc]))) as Aging_delay_Amount,

but again I have an error there.

Tags (1)
1 Solution

Accepted Solutions
MVP

## Re: Multiple Criteria in Sum expression

How about if you try this with double quotes?

Sum({<[Aging] = {">89"}>} [Amount.Loc])/Sum([Amount.Loc])

4 Replies
MVP

## Re: Multiple Criteria in Sum expression

How about if you try this with double quotes?

Sum({<[Aging] = {">89"}>} [Amount.Loc])/Sum([Amount.Loc])

New Contributor III

## Re: Multiple Criteria in Sum expression

Thanks a lot, finaly it works

Honored Contributor III

## Re: Multiple Criteria in Sum expression

May be change your script expressi to aflag

sum(If(Aging>89,([Amount.Loc]))) as Aging_delay_Amount,

to

If(Aging>89,1,0)) as Aging_delay_flag

in the chart

Sum({<[Aging_delay_flag] = {1}>} [Amount.Loc])

btw, did you check if your field value a number or a string?

New Contributor III

## Re: Multiple Criteria in Sum expression

This works good, too thank you