# Qlik Sense App Development

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for
Did you mean:
Creator III

## AGGR, with + <= joins in set anylsis

Hi

how do you complete a AGGR calculation with a complex set analysis . this is what I have and it don't work

Sum(Aggr(Sum({\$<RankNo =

{"=rank(Only({\$<OrderWeekFlag = {1}, [DeliveryDate] = {'>=\$(=vMinDeliveryWeek)'}>

+

<OrderWeekFlag = {1}>}RankNo)), [Department]))

<=

\$(=sum(aggr(sum({\$< [DeliveryDate]= {'>=\$(=vMinDeliveryWeek)'} , OrderWeekFlag = {1} >}

"},OrderWeekFlag = {1} >}

[HasOrder]), [Department]))

/ Sum(AGGR(sum({\$< OrderWeekFlag = {1} >}[HasOrder]), [Department]))

Kind Regards

5 Replies
Master

Try to change your expression like this:

=Sum({<[Buying Group]={"=rank(sum({<Date={'>=\$(=Date(monthstart(max(Date),-5)))<=\$(=Date(max(Date)))'}, Year, Month, [Month Year]>}[Exclusive Amount]))<21"}, Year=,Month=, [Month Year]=,

Date={">=\$(=Date(monthstart(max(Date),-5)))<=\$(=Date(max(Date)))"}

>}  [Exclusive Amount])

Creator III

Hi

I have tried to alter the above with no joy

just looking at the first part of the set analysis

Sum({\$<[Department] =

{"=rank(sum({\$<OrderWeekFlag = {1}, [DeliveryDate] = {'>=\$(=vMinDeliveryWeek)'}>

+

<OrderWeekFlag = {1}>}RankNo)), [Department]))

<=

\$(=sum(aggr(sum({\$< [DeliveryDate]= {'>=\$(=vMinDeliveryWeek)'} , OrderWeekFlag = {1} >}

"},OrderWeekFlag = {1} >}

[HasOrder]), [Department]))

I get just 0

Master

Can you please let me know, your requirement from the above expression?

Master

Can you provide the script or Screenshots of Objects, then it's better get an idea on it.

Creator III

Hi

is there a way of making the rank dynamic please. as I think that is the issue

I need to use

aggr(class(rank(sum

but I don't know where to slot it in the above expression..i have tried with no joy