[nQSError: 22040] 要使用 Ago 函数, 查询 ('[D10 期间.Period Key]') 的存储级别必须是静态级别

0
已邀请:
1

Yuvv - BIEE独立顾问、业务架构 2013-07-15 回答

存储级别:'' 逻辑列对应的物理表的时间粒度所在的级别被称为存储级别,所谓必须是静态级别的含义是您所用的ago函数级别需要在同一个列中数据应为同一级(数据库表中月的字段下不可以包含季度或日期),从报错的提示大致推断出错误原因是以上的错误设置导致的。下面说一下Ago函数正确的使用方法
使用 Ago 函数定义“去年同期值”

第一个参数是逻辑字段 Finance."Expense Fact".Amount,是用于时间轴运算的度量值;第二个参数是逻辑模型时间维的层级 Finance."Date"."Year Level",表明回溯的时间单位为年;第三个参数表示回溯的时间周期,1 则为回溯一年,即去年.
AGO(Finance."Expense Fact".Amount, Finance."Date"."Year Level", 1)

在进行时间查询时应注意几个重要的粒度,以查询 select "Date Dim"."Month Name", "Expense Fact"."Amount Year Ago" 为例:
"Date Dim"."Month Name" 为查询粒度。
"Expense Fact"."Amount Year Ago" 逻辑列对应的时间维层级为时间序列粒度。
在包含时间序列函数的查询中,时间序列粒度必须大于等于查询粒度。
"Expense Fact"."Amount Year Ago" 逻辑列对应的物理表的时间粒度被称为存储粒度。
与存储粒度对应的时间维层级上必须定义时间序列键。

错误以类似解答:
Support

The primary key of the table time must be an key in the lowest level
Remarks : the primary key of the table time must be an key in the lowest level, otherwise you can have this error.

To use AGO of TB function, the storage level of the query ('') must be a static level.
State: HY000. Code: 10058. A general error has occurred. AGO function may not be used on 'Sold' because its source is horizontally partitioned. (HY000)

要回复问题请先登录注册