Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
May be try this
FirstSortedValue(Aggr(Sum({<MonthEnd = {1}, Year, Month, Date>}BalQty), [Item Code], [nYearMonth]), -Aggr([nYearMonth], [Item Code], [nYearMonth]), 2)
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.
May be try this
FirstSortedValue(Aggr(Sum({<MonthEnd = {1}, Year, Month, Date>}BalQty), [Item Code], [nYearMonth]), -Aggr([nYearMonth], [Item Code], [nYearMonth]), 2)
Thanks Sunny_talwar
It work great!