使用icCube 5.1.2,動態集合和成員的定義方式與靜態集合在高級/腳本部分中的方式相同。 MDX IDE中計算的結果不同。這怎麼可能?靜態和動態集合的不同結果
-- Advanced/Scripts
-- CREATE STATIC SET [SET MTD] as Mtd(ClosingPeriod([temps].[temps].[jour]))
-- CREATE STATIC SET [SET MTDLY] as Mtd(ParallelPeriod([temps].[temps].[annee], 1, ClosingPeriod([temps].[temps].[jour])))
-- CREATE CATEGORY MEMBER [Util].[Categories].[default].[MTD] as [SET MTD]
-- CREATE CATEGORY MEMBER [Util].[Categories].[default].[MTDLY] as [SET MTDLY]
with
-- from static sets
member [Measures].[CM (STATIC SET)] as Sum([Util].[Categories].[default].[MTD], [Measures].[ventes]) * 0.001, format_string="#.#"
member [Measures].[CM LY (STATIC SET)] as Sum([Util].[Categories].[default].[MTDLY], [Measures].[ventes]) * 0.001, format_string="#.#"
-- dynamic members
member [Measures].[CM (DYNAMIC MEMBER)] as Sum(Mtd(ClosingPeriod([temps].[temps].[jour])), [Measures].[ventes]) * 0.001, format_string="#.#"
member [Measures].[CM LY (DYNAMIC MEMBER)] as Sum(Mtd(ParallelPeriod([temps].[temps].[annee], 1, ClosingPeriod([temps].[temps].[jour]))), [Measures].[ventes]) * 0.001, format_string="#.#"
-- dynamic sets
set [SET MTD 2] as Mtd(ClosingPeriod([temps].[temps].[jour]))
set [SET MTDLY 2] as Mtd(ParallelPeriod([temps].[temps].[annee], 1, ClosingPeriod([temps].[temps].[jour])))
member [Measures].[CM (DYNAMIC SET)] as Sum([SET MTD 2], [Measures].[ventes]) * 0.001, format_string="#.#"
member [Measures].[CM LY (DYNAMIC SET)] as Sum([SET MTDLY 2], [Measures].[ventes]) * 0.001, format_string="#.#"
select
{
[Measures].[CM (DYNAMIC MEMBER)],
[Measures].[CM (DYNAMIC SET)],
[Measures].[CM (STATIC SET)],
[Measures].[CM LY (DYNAMIC MEMBER)],
[Measures].[CM LY (DYNAMIC SET)],
[Measures].[CM LY (STATIC SET)]
}
on columns
from [Ventes]
Results:
-- current month this year
CM (DYNAMIC MEMBER): 42698.7
CM (DYNAMIC SET): 42698.7
CM (STATIC SET): 42697.1
-- current month last year
CM LY (DYNAMIC MEMBER): 44243.4
CM LY (DYNAMIC SET): 44243.4
CM LY (STATIC SET): 44242.1
我試過你的建議,但我仍然看到不同的值。使用不同的多維數據集設置進行測試後,我意識到當存儲策略設置爲「內存」時結果是相同的,但是當我將存儲策略設置爲「索引和文件中的事實」時,問題再次出現。 「緩存表」設置對結果沒有影響。該多維數據集在CentOS Linux上運行。 –
變得越來越複雜,您可以通過電子郵件與我們聯繫... – ic3
如果行數不是很大,您還可以嘗試使用鑽取技術http://www.iccube.com/support/documentation/mdx/Drillthrough.php – ic3