Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
robbiewottie
Contributor III
Contributor III

Set Analysis solution

Hi Guys,

I need a syntax for the following problem


I have a table with dimensions; Vendor,Item,Time (po date) and the expression is unit price. What I need is the lastest Po date of that item with the corresponding unit price. With that price I will calculate with other fields. So when I troggle on Vendor or Item and time, I always need the latest PO with unit price from the database.


VENDOR NAMEITEMPO LINE CREATION DATEUNIT PRICE
AxFloX00587014-1-201437,62
AxFloX00587017-6-201440,68

I think this can be achieved with the correct set analysis in the presentation layer but perhaps a solution in the script is also no problem...

Thanks in advance

Best regards

Robert

2 Replies
ashfaq_haseeb

Try first sorted value

Like below

FirstSortedValue(UNIT PRICE, -PO LINE CREATION DATE)

Regards

ASHFAQ

alexandros17

I should solve on script side, simply doing this:

If your table name is myTable then

Load * resident myTable;

left join

Load max([creation date]) as [creation date], '1' as flag resident myTable group by [Vendor Name], Item;

Now you have a flag field showing max (per Vendor and Item), use this field in your expression with set analysis and it will work

Let me Know