SSAS Partition Slice Expression

穿精又带淫゛_ 提交于 2019-12-24 00:27:06

问题


I am partitioning my cube by the most recent 13 months, and then a legacy partition to hold older months.

I have successfully created dynamic partitions, but now I need to add a dynamic slice to each partition.

I thought I could use this in the Partition Slice Expression:

    [Dim Date].[Month].&[" + CStr(Month(Now())) + "].lag(8)

but it's failing. Does anyone have any ideas?


回答1:


I tried all day, but ultimately resolved that partition slice expressions dont like anything that is not a dimension member value.

To be clear my goal was to create dynamic partitioning using the 14 described partitions above. Best Practice advises to also use slices on the partitions per Mosha's Article but since my partitons are dynamic, then my slices needed to be dynamic.

I finally added a member to my Date Dimension that mimics the dynamic labeling of the 14 partitions I wanted to create. Next I referenced the new date dimension member values to each of the corresponding partition slices, basically moving the "dynamic" slices to the cube structure.

It works great, and give me another usefull Dimension Member. I have also partitioned the fact table in the data warehouse with the same 14 partitions using a partitioning scheme, file groups, etc. As an added bonus, since everything is dynamic my SSIS package is much less complex and does not require DDL tasks to move partitions around.




回答2:


where are you doing this?

you should partition the data warehouse on your cube using T-SQL queries, not DMX queries:



来源:https://stackoverflow.com/questions/10657267/ssas-partition-slice-expression

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!