Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
krissy_s
Contributor III
Contributor III

Combine If statement with Aggr function

Hi Everyone!

Is it possible to combine and IF  statement into the following please?

=Aggr (Only({<[Risk Class] = {'Property'},[Risk Class] -= {'Unspecified'},[Distribution Method] = {'Case Traded'}>}

[Distribution Method]),[Policy Number])

i.e. I would like to add in the following statements:

If([Annual Premium] < '20,000')

If(wildmatch([Salesperson],'*smith*'))

but I  workout where in the set analysis (above) to include them. Can anyone help please??

Many thanks

1 Reply
MayilVahanan

Hi @krissy_s 

try like below

It depends on requirement

=Aggr (Only({<[Risk Class] = {'Property'},[Risk Class] -= {'Unspecified'},[Distribution Method] = {'Case Traded'},Salesperson={"*smith*"}, [Annual Premium] = {"<20000"} >}

[Distribution Method]),[Policy Number])

or

=Aggr (Only({<[Risk Class] = {'Property'},[Risk Class] -= {'Unspecified'},[Distribution Method] = {'Case Traded'},Salesperson={"*smith*"}, [Policy Number] = {"=Sum([Annual Premium] )<20000"} >}

[Distribution Method]),[Policy Number])

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.