我的数据如下:
输入
Year Region Sales Team Name
2014 East 30 Team1
2014 East 26 Team2
2014 East 28 Team1
2014 West 40 Team1
2014 West 34 Team2
2014 North 56 Team1
2014 North 50 Team2
2014 South 24 Team1
2014 South 32 Team2
2014 South 19 Team3
2015 East 35 Team1
2015 East 42 Team2
2015 East 54 Team3
2015 West 41 Team1
2015 West 43 Team2
2015 West 40 Team3
2015 North 38 Team1
2015 North 32 Team2
2015 North 41 Team3
2015 South 28 Team1
2015 South 29 Team2
我正在尝试实现如下输出: 输出
2014 East Team1
2014 West Team1
2014 North Team1
2014 South Team2
2015 East Team3
2015 West Team1
2015 North Team3
2015 South Team2
对于每年的每个地区类别,我必须显示最大销售额的团队名称。我可以通过给出条件MAX(SALES)以表格格式显示最大销售数量,但我无法显示团队名称。当我在列或TEXT字段中包含团队名称时,我也会获得该年度的所有其他行。
请在这方面帮助我。
答案 0 :(得分:4)
使用RANK公式,然后对其进行过滤。根据您的布局,根据需要调整计算。
rank(sum([Sales]))
在此处查看示例工作簿:https://dl.dropboxusercontent.com/u/60455118/161116%20stack%20question.twbx