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

Announcements
Annual Conference: Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

AGGR Statement

Can someone help me convert this to an AGGR statement?

If(sum([Inv Gross]) >= $(vMax) and sum([Inv Gross]) <= $(vMax1) and

   (sum([Billing Item Counter]) >= $(vMax2) and Sum([Billing Item Counter]) <= $(vMax3),

     (sum([Inv Gross])))

My dimension would be Level1

Thanks

9 Replies
preminqlik
Specialist II
Specialist II

hi there try this

sum(aggr(

If(sum([Inv Gross]) >= $(vMax) and sum([Inv Gross]) <= $(vMax1) and

   (sum([Billing Item Counter]) >= $(vMax2) and Sum([Billing Item Counter]) <= $(vMax3),

     (sum([Inv Gross])))

,Level1))

its_anandrjs
Champion III
Champion III

Try Like this

=Aggr(If(sum([Inv Gross]) >= $(vMax) and sum([Inv Gross]) <= $(vMax1) and sum([Billing Item Counter]) >= $(vMax2) and Sum([Billing Item Counter]) <= $(vMax3),(sum([Inv Gross]))), Level1)

Or

=Sum(Aggr(If(sum([Inv Gross]) >= $(vMax) and sum([Inv Gross]) <= $(vMax1) and sum([Billing Item Counter]) >= $(vMax2) and Sum([Billing Item Counter]) <= $(vMax3),(sum([Inv Gross]))), Level1))

tmumaw
Specialist II
Specialist II
Author

Nope

tmumaw
Specialist II
Specialist II
Author

Nope

its_anandrjs
Champion III
Champion III

May be Try this

=Aggr(sum(If(sum([Inv Gross]) >= $(vMax)  and sum([Inv Gross]) <= $(vMax1) and sum([Billing Item Counter]) >= $(vMax2) and Sum([Billing Item Counter]) <= $(vMax3), [Inv Gross]),Level1)

lironbaram
Partner - Master III
Partner - Master III

hi

what are you looking to achieve using aggr function

those the result of the expression should be display in a single line

bgerchikov
Partner - Creator III
Partner - Creator III

Hi Thom,

I'd suggest to use the following as Calculated Dimension:

=Aggr(If(sum([Inv Gross]) >= $(vMax) and sum([Inv Gross]) <= $(vMax1) and sum([Billing Item Counter]) >= $(vMax2) and Sum([Billing Item Counter]) <= $(vMax3),(sum([Inv Gross]))), Level1)


Expression:


sum([Inv Gross])


Hope it'll help

tmumaw
Specialist II
Specialist II
Author

Boris,

It's close, but no Level1 dimension is displayed.

Thanks

Thom

P.S.  I made the dimension an expression.

bgerchikov
Partner - Creator III
Partner - Creator III

Thom,

It would be easier to help you out if you'd attach some example. Are you sure you have Level1 records that satisfied these conditions i the current selection? Also, please double-check syntax.

Thanks!