Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

FirstSortedValue is not returning single value in set analysis.

Hi,

The FIrstSortedvalue is not working in this expression....If used alone it returns single date but it seems it is return NULL in set analysis..

Sum(Aggr(If(MonthName(Min({1}TxnDate)) = 'May 2013'), Sum({<TxnDate={$(=Date(FirstSortedValue((TxnDate), Aggr(Min({<TxnType={'Invoice'}>}TxnDate),CustomerListID, TxnDate))),'MM/DD/YYYY')}>}Amount), 0), CustomerListID))


Any idea?

Saurabh

4 Replies
Not applicable
Author

What about this expression in textbox?

$(=Date(FirstSortedValue((TxnDate), Aggr(Min({<TxnType={'Invoice'}>}TxnDate),CustomerListID, TxnDate))),'MM/DD/YYYY')


??


regards

Darek

Not applicable
Author

Hi Darek,

BOth expressions  work in textbox but they do not work when i used them in expression....

BTW..is it possible to use the value of textbox in a expression.?

Anonymous
Not applicable
Author

Hi, Ramya.

Try encircling the $() in single quotes:

Sum(Aggr(If(MonthName(Min({1}TxnDate)) = 'May 2013'), Sum({<TxnDate={'$(=Date(FirstSortedValue((TxnDate), Aggr(Min({<TxnType={'Invoice'}>}TxnDate),CustomerListID, TxnDate))),'MM/DD/YYYY')'}>}Amount), 0), CustomerListID))


Hope it helps.

Not applicable
Author

Nope!
It did not work..