Find the max number of issues from 3 statuses and return the corresponding status category

Hi, i’d like to determine the status value which contains the highest number of issues…
3 status categories…

item | To Do | In progress | Done ---- Result
1 | 5 | 10 | 15 — Done
2 | 10 | 5 | 3 ---- To Do
3 | 5 | 10 | 1 ---- In Progress

so for;
item 1 i want to return Done (with 15 issue)
item 2 i want to return To Do (with 10 issue)
item 3 i want to return In progress (with 10 issue)

I’m trying to create a calculated field that returns which status category has the highest number of issues…
or a number corresponding to status category containing the most number of issues (1, 2 or 3)

Any help would be much appreciated.
Thanks
Raj

Hi @w853rdc
To get the status category that have the most issues created, you can use this formula:

Generate(
  Head(
    Order(
    [Status.Category].[Category].Members,
    [Measures].[Issues created],
    BDESC),
  1),
[Status].CurrentHierarchyMember.Name,
--split by
","
)

In the report, it would look like this:

best,
Gerda support@eazybi.com