Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
maxloveiii
Contributor III
Contributor III

How to use max yearmonth in Set Analysis

Hi, Experts

How can I use my first expression value (Max of nYearmonth of each Item)  in set analysis of second expression. Item 31-KT-0-0007 result is correct but Item 31-KT-0-0006 isn't correct because max of nYearmonth is 202006 instead of 202004

Thanks in advance

Max

Qlik.PNG

 
 
 
 
 
1 Solution

Accepted Solutions
sunny_talwar

May be try this

FirstSortedValue(Aggr(Sum({<MonthEnd = {1}, Year, Month, Date>}BalQty), [Item Code], [nYearMonth]), -Aggr([nYearMonth], [Item Code], [nYearMonth]), 2)

View solution in original post

3 Replies
Steven_Haught
Creator III
Creator III

You need to have double quotes "" surrounding the set expression, instead of the single quotes,  in the set expression. It acts like a search function with your $ expansion. 

sunny_talwar

May be try this

FirstSortedValue(Aggr(Sum({<MonthEnd = {1}, Year, Month, Date>}BalQty), [Item Code], [nYearMonth]), -Aggr([nYearMonth], [Item Code], [nYearMonth]), 2)
maxloveiii
Contributor III
Contributor III
Author

Thanks Sunny_talwar 

It work great!

maxloveiii_0-1596797201358.png