Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
amruta_j
Partner - Contributor III
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
simenkg
Specialist
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)))

View solution in original post

9 Replies
qlikviewwizard
Master II
Master II

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

balabhaskarqlik

May be:

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

tresesco
MVP
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?

amruta_j
Partner - Contributor III
Partner - Contributor III
Author

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

tresesco
MVP
MVP

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

amruta_j
Partner - Contributor III
Partner - Contributor III
Author

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

simenkg
Specialist
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)))

tresesco
MVP
MVP

Try like:

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

Or,

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

amruta_j
Partner - Contributor III
Partner - Contributor III
Author

Thank you again !! Total works great.