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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
timmoe11
Contributor
Contributor

FirstSortedValue shows multiple results in straight table

Hi There! 

i think i'm a little lost right now.. maybe i think way to complicate.

I'd like to lookup the Bin Code with the highest quantity in stock for managing our replenishment.

dimension: itemno (key field between item-table and bincontent-table)

Formula used:

#1

FirstSortedValue([LP.Bin Code], -Aggr(sum(LP.Quantity),[LP.Bin Code]))

#2

FirstSortedValue(LP.Quantity, -Aggr(sum(LP.Quantity),[LP.Bin Code]))

 

results are ok, when i select a single itemno in the app. as soon as i unselect the itemno, results in the straight table are mad..

 

any idea what i'm doing wrong? do i have to set this up in load script? any idea how? thank you!

 

timmoe11_0-1660244250107.png

 

Tim

Labels (2)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master II
Partner - Master II

I meant as part of the expressions

#1

FirstSortedValue([LP.Bin Code], -Aggr(sum(LP.Quantity),[LP.Bin Code],itemno))

#2

FirstSortedValue(LP.Quantity, -Aggr(sum(LP.Quantity),[LP.Bin Code],itemno))

View solution in original post

3 Replies
BrunPierre
Partner - Master II
Partner - Master II

Maybe by adding the itemno as a dimension.

timmoe11
Contributor
Contributor
Author

itemno is a dimension in both charts..

BrunPierre
Partner - Master II
Partner - Master II

I meant as part of the expressions

#1

FirstSortedValue([LP.Bin Code], -Aggr(sum(LP.Quantity),[LP.Bin Code],itemno))

#2

FirstSortedValue(LP.Quantity, -Aggr(sum(LP.Quantity),[LP.Bin Code],itemno))