Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

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.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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
tresesco
MVP
MVP

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?

tresesco
MVP
MVP

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

tresesco
MVP
MVP

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

               Aggr(

                         <AboveExpression>

                         ,[Core Source System]

                         )

          )