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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
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

18 Replies
Anonymous
Not applicable
Author

Hi Manish,

I was trying to do this expression also and getting below error:

Error: Error in set modifier ad hoc element list:',' or ')' expected

 

Anonymous
Not applicable
Author

Hi Kushal,

thanks for try to help

Max MonthYear is working for other measures, so it should work for this measure also isn't it.

correct me if I am wrong.

Kushal_Chawda

try this

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

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])

Anonymous
Not applicable
Author

output is 0(Zero)

MK_QSL
MVP
MVP

You can share you app now... This discussion will go on and on and would never finish... Better we can directly work on sample app.

Anonymous
Not applicable
Author

Hi,

Getting same error:

Error: Error in set modifier ad hoc element list:',' or ')' expected

Anonymous
Not applicable
Author

Thanks Manish and Kushal.

wrong assumption on my part if its working in other expressions it should work here also.

Below expression solved my Issue with your help:

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

MK_QSL
MVP
MVP

Great that you got solution for your problem..!