从有序列表中提取第二个值 [英] Extracting second value from ordered list

查看:36
本文介绍了从有序列表中提取第二个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是按字母顺序排列的国家/地区列表.

The following gives me a list of the countries in alphabetical order.

如何更改它以便不返回整个列表而只返回此列表中的第二个国家/地区?就我们的立方体而言,这只是 Aland Islands 的结果.

How do I change it so that instead of returning the whole list it just returns the second country in this list? In terms of our cube this would just be the result for the Aland Islands.

SELECT
        ORDER([Geolocation].[Geography].[Geography Country].MEMBERS,
             [Geolocation].[Geography].CurrentMember.name, BASC ) ON ROWS,            
        [Measures].[DefaultMemberName] ON COLUMNS
FROM    [MyCube]

推荐答案

您可以使用 item 函数;如果我没记错的话,它是基于 0 的:

You can use the item function; if I remember well it is 0-based :

ORDER( [Geolocation].[Geography] ... )(1)

这篇关于从有序列表中提取第二个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆