我总是在使用python的MDX查询中得到一个值。我正在连接到支持xmla的icCube。在
provider = xmla.XMLAProvider()
con = provider.connect(location='conn_str',username='q1',password='q2')
cmd="""WITH MEMBER Measures.[Avg Profit Margin] AS Sum(SOMETHING, Measures.[Profit Margin]) select NON EMPTY {[Measures].[Profit Margin]} ON columns, {[Client Country]} ON rows FROM [XYZ]"""
res=con.Execute(cmd,Catalog="cube_closed_contracts")
print res.getSlice()
为什么它总是返回一个值?在
^{pr2}$
您确定MDX查询将返回多个单元格吗?在
“[Client Country]on rows”表示[Client Country]的默认成员,因此我相信这将返回单个单元格结果。我会在iccubemdx编辑器中尝试这个请求。在
希望有帮助。在
相关问题 更多 >
编程相关推荐