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

Max Date in Hierarchy Table

Hi, I have a hierarchy table with various end dates based on quotations. 

I want to display a table with the parent quotation, the initial end date and the end date of the last sub quotation.

Tihs is what it looks like if I visualise the total table.

QuoteQuote1Quote2Quote End.Date1Quote End.Date2
Q2020-765Q2020-765NULL28/06/202028/06/2020
Q2020-765-1Q2020-765Q2020-765-130/07/202030/07/2020
Q2020-766Q2020-766NULL14/06/202014/06/2020
Q2020-766-1Q2020-766Q2020-766-128/06/202028/06/2020
Q2020-767Q2020-767NULL15/07/202015/07/2020
Q2020-767-1Q2020-767Q2020-767-130/07/202030/07/2020

 

The formula I use is 

=if(QuoteParentID='NULL', [Quote End.autoCalendar.Date],
Max({$<QuotationID={$(=Max(QuotationID))},[Quote Status]-={"Cancelled","Rejected"}>}[Quote End.autoCalendar.Date]))

The way I want the table to show is without the subquotes (only parent quote) and the inital end date and final end date on the same line. As below example.

QuoteQuote End.DateQuote End.Date2
Q2020-76528/06/202030/07/2020
Q2020-76614/06/202028/06/2020
Q2020-76715/07/202030/07/2020

Anybody can help me with the correct formula please.

Thanks in advance.

Paul

 

Labels (3)
0 Replies