SSAS - 始终显示零 - 不显示空白

发布于 2024-09-10 05:17:13 字数 250 浏览 2 评论 0原文

我有一个通过 Targit(BI 解决方案)访问的多维数据集。当我浏览/使用该多维数据集时,如果为空/空白而不是空白,我希望所有数量结果为零,但无论我尝试什么,我都会得到空白。我已更改相关度量的空处理属性,并尝试更改/删除格式字符串。我仍然得到空白而不是零。

想法?

更新:我发现我可以创建一个计算度量并使用 iif / isempty 函数强制为零。这是可行的 - 只是想知道是否有更干净的方法来实现这一点。

谢谢

比尔

I have a cube that I access via Targit (BI Solution). When I browse / use that cube I want all quantity results to be a zero if null / blank NOT a blank, but no matter what I try I get blanks. I have changed the Null Processing property for the measure in question as well as attempted to change / remove the format string. I still get blanks instead of zero's.

Thoughts?

UPDATE: I figured out that I could create a calculated measure and use iif / isempty funcitons to force zeros. This works - just wondering if there is a cleaner way to accomplish this.

Thanks

Bill

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

沧桑㈠ 2024-09-17 05:17:13

尝试使用格式化表达式,例如 FORMAT_STRING = "#.00;(#.00);#.00;-"
这应该会给出所需的结果,而不会影响性能。

更多信息:
http://msdn.microsoft.com/en-us/library/ms146084。 ASPX

Try using a formating expression such as FORMAT_STRING = "#.00;(#.00);#.00;-"
This should give the desired results without the perf hit.

More info:
http://msdn.microsoft.com/en-us/library/ms146084.aspx

快乐很简单 2024-09-17 05:17:13

如果源数据包含度量字段的 NULL 值,则可能有两种解决方案:

  1. 如果您使用 DSV 中的表,则将其替换为视图或命名查询以及 ISNULL(field_name, 0) 可空度量字段。
  2. 在多维数据集内度量的 MeasureExpression 属性中使用计算度量的代码,而不是在单独的计算字段中。我从未尝试过,但看起来它会起作用。

如果问题不是由源数据中的 NULL 值引起的,请详细说明问题。

There may be two solutions if the source data contains NULL values for measure fields:

  1. If you are using a table in the DSV, then replace it either with a view or a Named Query and ISNULL(field_name, 0) the nullable measure fields.
  2. Use the calculated measure's code in the MeasureExpression property of the measure within the cube instead of in a separate calculated field. I've never tried it, but it seems like it would work.

If the problem is not caused by NULL values in the source data, then please elaborate on the problem.

会发光的星星闪亮亮i 2024-09-17 05:17:13

试试这个:

Measure Name=IF(SUM(ColumnName)=BLANK(),0,SUM(ColumnName))

Try this:

Measure Name=IF(SUM(ColumnName)=BLANK(),0,SUM(ColumnName))

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文