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: 
Not applicable

Advanced Aggr Function

I am trying to solve for the code below

sum({$<CalendarYear = {$(#=max(CalendarYear))}>} [Spend])) /

sum(aggr(sum({$<CalendarYear = {$(#=max(CalendarYear)-1)}>} [Spend])) /

sum({$<CalendarYear = {$(#=max(CalendarYear)-1)},CalendarQuarter=,CalendarMonth=>} Qty)) *

sum({$<CalendarYear = {$(#=max(CalendarYear))}>} if(len(Subcategory)>0,Qty)), Material))

On top of this I want to add the below condition for spend in the numerator (highlighted in red):

Calculate spend in current year only when Material exists in "max(CalendarYear)-1" so I wanted to use an aggr function in Numerator?

Thanks,

Prakash

0 Replies