数据仓库多维数据集 MDX查询的问题
我的MDX语句(查询每天24小时中的最大值):withmember[DimDateOfHour].[DateOfHourKey].[最大值]asMAX({[DimDate...
我的MDX语句(查询每天24小时中的最大值):
with member [Dim Date Of Hour].[Date Of Hour Key].[最大值] as MAX({[Dim Date Of Hour].[Date Of Hour Key].&[0]:[Dim Date Of Hour].[Date Of Hour Key].&[23]})
select [Dim User Type].[Type Name].children on columns,
NonEmpty([Dim Date].[Full Date].children*[Dim Date Of Hour].[Date Of Hour Key].[最大值]) on rows
from [Kysd Statistics V2DB]
where [Dim User Type].[Parent User Type Key].&[2]
查询结果:
我想把[Dim Date Of Hour].[Date Of Hour Key].[最大值] 中的'最大值'换成MAX函数里具体的小时数该怎么写?? 展开
with member [Dim Date Of Hour].[Date Of Hour Key].[最大值] as MAX({[Dim Date Of Hour].[Date Of Hour Key].&[0]:[Dim Date Of Hour].[Date Of Hour Key].&[23]})
select [Dim User Type].[Type Name].children on columns,
NonEmpty([Dim Date].[Full Date].children*[Dim Date Of Hour].[Date Of Hour Key].[最大值]) on rows
from [Kysd Statistics V2DB]
where [Dim User Type].[Parent User Type Key].&[2]
查询结果:
我想把[Dim Date Of Hour].[Date Of Hour Key].[最大值] 中的'最大值'换成MAX函数里具体的小时数该怎么写?? 展开
展开全部
再用笛卡儿积乘下试试,你的计算度量 [Dim Date Of Hour].[Date Of Hour Key].[最大值] 本身是一个计算结果,最大值是不能换的,只能考虑通过其他写法实现。
with member [Dim Date Of Hour].[Date Of Hour Key].[最大值] as MAX({[Dim Date Of Hour].[Date Of Hour Key].&[0]:[Dim Date Of Hour].[Date Of Hour Key].&[23]})
select [Dim User Type].[Type Name].children on columns,
NonEmpty([Dim Date].[Full Date].children*[Dim Date Of Hour].[Date Of Hour Key].[最大值]*[Dim Date Of Hour].[Date Of Hour Key]) on rows
from [Kysd Statistics V2DB]
where [Dim User Type].[Parent User Type Key].&[2]
with member [Dim Date Of Hour].[Date Of Hour Key].[最大值] as MAX({[Dim Date Of Hour].[Date Of Hour Key].&[0]:[Dim Date Of Hour].[Date Of Hour Key].&[23]})
select [Dim User Type].[Type Name].children on columns,
NonEmpty([Dim Date].[Full Date].children*[Dim Date Of Hour].[Date Of Hour Key].[最大值]*[Dim Date Of Hour].[Date Of Hour Key]) on rows
from [Kysd Statistics V2DB]
where [Dim User Type].[Parent User Type Key].&[2]
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询