Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Count of Max Value for Latest Month

Hi Experts,

I have data as below:

MonthNameTypeMonths Overdue
Feb-19JaneA2
Feb-19JaneB2
Feb-19JaneC2
Feb-19TimD1
Feb-19TimE1
Feb-19SallyF1
Jan-19SallyG4
Jan-19JohnH3

 

I want to display in a text box the count of the max value of Months Overdue for the latest month:

"3 types with 2 months overdue"

 

How do I go about doing this? Been stuck on this forever. Please type in example as I can't open Qlikview files. Thank you.

Labels (4)
1 Solution

Accepted Solutions
Highlighted
Contributor III
Contributor III

I fixed it:

I created a variable vMaxNumMonths, which holds the set expression for latest month and max(Months overdue), and just place it in the set expression.

Thanks all.

View solution in original post

3 Replies
Highlighted
Specialist
Specialist

Types = Count( {<[Months Overdue]= {"$(=Max([Months Overdue]))"}>} Type )

Months Overdue =max([Months Overdue])

 

=Count( {<[Months Overdue]= {"$(=Max([Months Overdue]))"}>} Type ) & ' types with ' & max([Months Overdue]) & ' months overdue'

 

or you can use Aggr() function.

To help community find solutions, please don't forget to mark as correct.
Highlighted
Contributor III
Contributor III

Hi Claudiu,
Your solution does not work for me. I do have data for different months. I've updated my post for better understanding. thanks.

Also, I can't open Qlikview files as I'm on Personal Edition. 

Highlighted
Contributor III
Contributor III

I fixed it:

I created a variable vMaxNumMonths, which holds the set expression for latest month and max(Months overdue), and just place it in the set expression.

Thanks all.

View solution in original post