In Birt Reports - Displaying the most common string value in group.

Posted by Ben on Stack Overflow See other posts from Stack Overflow or by Ben
Published on 2010-06-14T08:49:01Z Indexed on 2010/06/14 8:52 UTC
Read the original article Hit count: 209

Filed under:
|

For this example data:

Index, State, Food
1, CA, Hamburger
2, NY, Lettuce
3, CA, Cheese
4, NY, Lettuce
5, NY, Cheese
6, AR, Cheese

I would like to group by State and show the most common food for each state. So the result for the example should be:

State, Popular Food
CA, Hamburger
NY, Lettuce
AR, Cheese

The problem is I can't find an aggregation that would return the most common string. There is the 'mode' function but it only works on integers. Am I missing Something? Thanks!

© Stack Overflow or respective owner

Related posts about reports

Related posts about birt