Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for
Search instead for
Did you mean:
Partner - Contributor III

## minimum date out of 4 max dates

Hello all,

I want a min(date) out of 4 max(date). Below is the scenario:

Key_CatMax(Latest_Date)
Auto Loans
 25-Jun-18
Deposit25-Jun-18
Mortgage
 25-Jun-18
Share Financing
 30-May-18

I want to show 30-May-18 as final date in some other table.

Deposit and Secured LoansData as of
AutoLoans.A130-May-18
AutoLoans.A2
Deposit.D1
Mortgage.M1
ShareFinancing.S1
Some other section

I have applied below formula, but that doesn't give me required date i.e. 30-May-18.

=date(min(aggr(max(Latest_date),Key_Cat)))

Please help me. Thanks in advance!

Message was edited by: Amruta Joshi Sorry about confusion. Added sample Data and expected output. Thank You!

1 Solution

Accepted Solutions
Specialist

You need to use the Total qualifier to calculate across dimensions in you chart.

Try. date(min(total <Key_Cat> aggr(max(Latest_date),Key_Cat)))

9 Replies
Master II

Your sample data is confusing. Can you provide some more data?

Master

May be:

=date(Min(Max(Date))) as [Data as of]

MVP

Have you tried your expression: =date(min(aggr(max(Latest_date),Key_Cat))) in a textbox? That should give you the expected output. Could you share your sample qvw?

Partner - Contributor III
Author

Sorry could not share the whole application. But I'm getting correct result in textbox, not in table.

MVP

What are the dimensions you are using in the chart? Could you share a screenshot?

Partner - Contributor III
Author

I'm creating straight table shown in Excel sheet 2. Dimension are Key_Cat, Sub_Cat, Latest_date

Specialist

You need to use the Total qualifier to calculate across dimensions in you chart.

Try. date(min(total <Key_Cat> aggr(max(Latest_date),Key_Cat)))

MVP

Try like:

=date(min(Total aggr( max(Latest_date),Key_Cat)))

Or,

=date(min(Total aggr( NODistinct max(Latest_date),Key_Cat)))

Partner - Contributor III
Author

Thank you again !! Total works great.

Community Browser