Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count of Distinct managers for max monthyear with more than 5 direct report

Hi All,

Please let me know what's wrong with below expression:

Count({<[MANAGER GEID] = {"=Count([DRs All])>5"},MonthYear = {"$(=max(MonthYear))"} >} Distinct [MANAGER GEID])

We have to select max monthyear to get accurate count, but I want to display right count by default for max monthyear.

Thanks

Neetha

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Use this

=COUNT({<[MANAGER GEID] = P({1<[MANAGER GEID] = {"=COUNT({<MonthYear = {'$(=Date(Max(Date#(MonthYear,'MMM-YYYY')),'MMM-YYYY'))'}>}[DRs All])>5"}>}[MANAGER GEID])>}DISTINCT [MANAGER GEID])

View solution in original post

18 Replies
Kushal_Chawda

try to give format to your month year

Assuming your monthyear date format is 'MMM-YYYY'

Count({<[MANAGER GEID] = {"=Count([DRs All])>5"},MonthYear = {"$(=Date(max(MonthYear),'MMM-YYYY'))"} >} Distinct [MANAGER GEID])

Anonymous
Not applicable
Author

Hi Kushal,

Still issue persists, I have to select max monthyear.

Kushal_Chawda

can you show the screenshot of MonthYear field in list box?

Anonymous
Not applicable
Author

Hi,

Its same as you guessed - May-2016

Digvijay_Singh

try to see the result of expression at straight table header, it may show you that month year is not properly compared.

Anonymous
Not applicable
Author

Hi Digvijay,

when I look at straight table header it still gives right Max MonthYear,but still I have to select max monthyear

sasikanth
Master
Master

Try something like ,

Month_Year={"$(=Date(max(Date_Field),'MMM-YYYY'))"}>}

MK_QSL
MVP
MVP

Try this...

=Count({<[MANAGER GEID] = {"=Count({<MonthYear = {"$(=Date(max(MonthYear),'MMM-YYYY'))"}>}[DRs All])>5"},MonthYear = {"$(=Date(max(MonthYear),'MMM-YYYY'))"} >} Distinct [MANAGER GEID])

Kushal_Chawda

just wanted to know if it is not string