Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
swarnendu
Creator II
Creator II

how to pick max date wise value for each row?

Hi all,

I have a table showing Master_Code, Master_Code_NO , dates and quantities:

errpppp.jpg

I want to pick the value   for each master code number using by an expression the last date value in the table

Can someone let me know how ?

i used the expression is

=Sum({<%Tran_Date={'$(vTEST)'}>}Opening_Qty)

where

vTEST =(max({<Opening_Qty = {'<>0'}>}%Tran_Date))

thx.

Swarnendu

26 Replies
tresesco
MVP
MVP

Yes, set analysis section '{<Opening_Qty={'<>0'}>}' is responsible for that. If you want to consider 0 values too, then just remove the set from the expression.

swarnendu
Creator II
Creator II
Author

Thanks for your helping its working ...

swarnendu
Creator II
Creator II
Author

need one more help.

if i select month then its show me properly but i want this basis of date range.

i want use  like this {<%Tran_Date={'>=$(vFromDate)<=$(vToDate)'}>}

how i use this ?

tresesco
MVP
MVP

Try like:

FirstSortedValue(Aggr(Sum({<%Tran_Date={'>=$(vFromDate)<=$(vToDate)'}>}Opening_Qty),%Tran_Date,New_MasterCode,MasterCode),-Aggr(Only({<%Tran_Date={'>=$(vFromDate)<=$(vToDate)'}>}%Tran_Date),%Tran_Date,New_MasterCode,MasterCode))

swarnendu
Creator II
Creator II
Author

Lots of thanks brother...

Its work fine..

swarnendu
Creator II
Creator II
Author

Brother can you please share your email id.?

tresesco
MVP
MVP

I will, drop a mail in your inbox.