Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
leefraser
Contributor II
Contributor II

Dimension in a KPI

Good morning, I am trying to return our busiest month in a KPI.

I can see the data in a table

Dimension = (Month)    NB  month is a field within our data

Measure = count(Report)

However I just want the busiest month to return in a KPI when I choose year, or a range of months from a filter.

I have used =maxstring(month)  I beleive this is returning the longest word and is incorrect ???

I have also tried =FirstSortedValue([Month],aggr(count(Report),[Month])) however I am receiving a '-'

Can anyone advise on a solution for this issue ??

Any help would be appreciated.

Thank you

1 Solution

Accepted Solutions
leefraser
Contributor II
Contributor II
Author

Hi all, thank you for posting your options.  We have found a way that works to retrive the most common (or busiest month)

=mode(Month)

This returns text in a KPI and shows the name of the month with the highest number of reports.

feb.PNG

View solution in original post

6 Replies
Arthur_Fong
Partner
Partner

Hi Lee,

Refer to the attachment below and look at the max sales column expression.

Thanks and regards,

Arthur Fong

enriquejts
Partner
Partner

hello I'm new to this but you could try the next formula in measurements

Max(informes)

and so that the name of the month appears on the label you can use the following expression

=FirstSortedValue (mes, informes,Count(mes))

solucion mes.JPG

balabhaskarqlik

May be use this:

=Aggr(Only({<Sales = {'$(=Max(Sales))'}>}Month),Month)

balabhaskarqlik

=Only({<Sales = {'$(=Max(Sales))'}>}Month)

karthiksrqv
Partner
Partner

Can you see if this approach is workable:

SubField(

mid(

concat(distinct aggr(count(ReportField)&'|'&concat(distinct Monthfield),Monthfield),','),

findoneof(

concat(distinct aggr(count(ReportField)&'|'&concat(distinct Monthfield),Monthfield),','),

max(aggr(count(ReportField),Monthfield),',')

)

)

,

'|',

2

)

leefraser
Contributor II
Contributor II
Author

Hi all, thank you for posting your options.  We have found a way that works to retrive the most common (or busiest month)

=mode(Month)

This returns text in a KPI and shows the name of the month with the highest number of reports.

feb.PNG

View solution in original post