# App Development

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for
Did you mean:
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
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.

6 Replies
Partner

Hi Lee,

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

Thanks and regards,

Arthur Fong

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

Master

May be use this:

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

Master

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

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

)

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.

Tags
Community Browser