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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
techvarun
Specialist II
Specialist II

FirstSortedValue Expression issue

Hi Experts,

The Below Expression is not evaluating the FirstSortedValue Statement.

=sum({1< [Source System] ={DLDAU}, [A Process Date]={"=FirstSortedValue({<[A Process Date]={'<=$(=Max([A Process Date]))'},_Day=,_Month=, _Year=>} TOTAL <[Source System]> [Process Date], -[Process Date])"}>}[B Job SuccessCNT])

Please help me to fix.

Thanks a lot in advance.

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Try:

FirstSortedValue({<Core_Day=,Core_Month=, Core_Year>} Aggr( NODISTINCT Sum({<Core_Day=,Core_Month=, Core_Year>} [CoreB Job SuccessCNT]),[Core Source System],[Core Process Date]), -[Core Process Date])

Capture.JPG

View solution in original post

6 Replies
tresB
Champion III
Champion III

A quick fix try:

[A Process Date]={'$(=FirstSortedValue({<[A Process Date]={'<=$(=Max([A Process Date]))'}_Day=,_Month=, _Year=>} TOTAL <[Source System]> [Process Date], -[Process Date]))'}


If this doesn't work, try to share a sample app.

techvarun
Specialist II
Specialist II
Author

Thanks tresesco‌ for the prompt reply, However I am yet to get the desired result.

Kindly refer the attached app.

For the selection of Sep 18 currently i am getting the below result

 

Core Source SystemdateSum
1232018-09-270
2252018-09-2812

And my expected result is

 

Core Source SystemdateSum
1232018-09-2712
2252018-09-2812

Where as the Sum for 123 should come from Sep 27.

Thanks a lot in advance

techvarun
Specialist II
Specialist II
Author

Hi experts,

Any Inputs?

tresB
Champion III
Champion III

Try:

FirstSortedValue({<Core_Day=,Core_Month=, Core_Year>} Aggr( NODISTINCT Sum({<Core_Day=,Core_Month=, Core_Year>} [CoreB Job SuccessCNT]),[Core Source System],[Core Process Date]), -[Core Process Date])

Capture.JPG

techvarun
Specialist II
Specialist II
Author

Thanks Tresesco

This works like a charm, I have another query what if i need to Display the Sum (24 in this case) in a text box?

Please help me with that

tresB
Champion III
Champion III

=Sum({<Core_Day=,Core_Month=, Core_Year>}

               Aggr(

                         <AboveExpression>

                         ,[Core Source System]

                         )

          )