SSAS 日期测量空时的最大字符串格式
我有一个具有日期类型度量的多维数据集,执行最大聚合,其中某些数据点的日期为空值。在这些情况下,最大值变为 12/30/1899,我认为这是日期的最早表达。
有没有办法让这些在结果中显示为空白而不是这个伪造的日期?
我尝试使用该度量的 StringFormat 属性,但没有成功。
I have a cube with a measure of type date, performing a max aggregation, where some of the data points have a null value for date. In these cases, the Max value becomes 12/30/1899 which I believe is the earliest expression of a date.
Is there a way to have these appear in the results as blank rather than this bogus date?
I tried to use the measure's StringFormat property with no luck.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将度量的 NullProcessing 属性更改为保留。您可以在 BIDS 中执行此操作。打开项目,然后打开多维数据集,然后在“多维数据集结构”选项卡上展开度量值组,然后选择度量。在属性窗格中选择“源”,将其展开,您应该会在其中看到该属性。 处理后,度量将为 NULL,而不是分配给 NULL 的默认 0。然后,0 会转换为日期,并在 Excel 中变为 00/01/1900。
Change the NullProcessing property for your measure to Preserve. You can do this in BIDS. Open the project, then the cube, then on the Cube Structure tab expand the measure group and then select the measure. In the properties pane select Source, expand it and you should see the property there. After you process, the measure will be NULL instead of the default 0 which gets assigned to NULLs. The 0 then gets cast to a date and becomes 00/01/1900 in Excel.