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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using a value in a pivot table as condition

Hi community,

Is it possible to use a value inside a pivot table as a condition for another column(expression)?

For example, I'm looking at last year's sales and I wanted to see in a column, for a given item, when has was the last sale made (record_date).

So I wrote: max ({$<doc_type = {"SALES"} , doc_status = {"CLOSED"}>} record_date)

And I've found correctly the last record_date.

Since each sale has it's specific document number, I also wanted to find their document number.

The problem is, it's not always in order because the sales aren't always closed in the order they are inserted into the database.

How can I find the doc_nr using the record_date I've found in max ({$<doc_type = {"SALES"} , doc_status = {"CLOSED"}>} record_date)?

Thank you for your help!

0 Replies