Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
cloud
New 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
cloud
New Contributor III

Re: Count of Max Value for Latest Month

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
Claudiu_Anghelescu
Contributor III

Re: Count of Max Value

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.
cloud
New Contributor III

Re: Count of Max Value

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. 

cloud
New Contributor III

Re: Count of Max Value for Latest Month

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