Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
SupplyAndDemand
Contributor II
Contributor II

Aggregate dimension in Pivot on an expression with FirstSortedValue aggregated over a time period...

I am trying to aggregate in a pivot on an expression that uses FirstSortedValue aggregated over a time period and a lower dimension.

This is the pivot where the expression “Projected_Inventory” is only showing the last value in the latest week, no matter if you collapse the week and only show the Year.  Product4 will only show the total as 5.

Capture.PNG

The Expression:

FirstSortedValue(Aggr(Sum(Projected_Inventory), Week,Product), -Aggr(Week, Week,Product))

The problem is when I try to collapse the dimension “Product” to only show “Product Type”. I want the expression to summarize the last week value for all the items in that Product Type. E.g  Product4 and Product3 should give the Type 2=14 in total value. I can do this by showing another chart and replace Product with Product Type in the expression, but it is not as nice and easy to work with as one dynamic table.

Labels (3)
1 Reply
Brett_Bleess
Former Employee
Former Employee

I believe the following Design Blog post may be of some help:

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.