Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

get the amount of the max line number

Hello

I got a table that contains the ItemID, TransactionNo., and the StockAmount

on a specific date I may have the following data

ItemID     TransactionNo     StockAmount

27          13397068          5820.72

27          13389275          5849.45

27          13377953          5839.65

now I want to display on a pivot table the ItemId the maximum transactionNo. along with the related stockAmount

I put as dimension the ItemID

now the expressions are Expression1 and Expression2

Expression1 = Max(TransactionNo) and I get 13397068

Expression2 = StockAmount but I get -

what shall I do

Please advise

I can walk on water when it freezes
16 Replies
ali_hijazi
Partner - Master II
Partner - Master II
Author

Actually if I select the specified item 27 I get the correct result as per your attached sample

however If you remove the selection on the items I get zeros!!!

I can walk on water when it freezes
Sokkorn
Master
Master

Hi,

Can you give me a full data source? So that I can easy to find the solution.

Regards,

Sokkorn

its_anandrjs

Hi,

See the attached sample file for clearity

Regards,

Anand

ali_hijazi
Partner - Master II
Partner - Master II
Author

My source file is 450MB how can I share it with you?

I can walk on water when it freezes
Sokkorn
Master
Master

Hi,

Check my attached file again.

Let me know if this one help you.

Regards,

Sokkorn

ali_hijazi
Partner - Master II
Partner - Master II
Author

Actually I found out that the function FirstSortedValue solves my problem

FirstSortedValue({<PerioDate={"<=$(=PerioDate)"}>} StockAmount,-TransactionID)

I can walk on water when it freezes
Sokkorn
Master
Master

Hi,

It helpful function.

Regards,

Sokkorn