在两个不同的 tablix SSRS 2005 中减去两列
Subtract two columns in two different tablix SSRS 2005
我的报告 (SSRS 2005) 中有两个 tablix。我想从两个不同的列中减去。我使用以下内容:
=Math.Round(Sum(Fields!LY_Sales.Value, "Ds1"))-Math.Round(Sum(Fields!TY_Sales.Value, "Ds2"))
为了显示列,我使用以下内容:
=Format(Math.Round(Sum(Fields!LY_Sales.Value)),"#,##")
=Format(Math.Round(Sum(Fields!TY_Sales.Value)),"#,##")
示例显示值:
单独的列:LY_Sales - 40,240
TY_Sales - 86,983
差值:-47406
这不代表实际差异,数值略有不同。另外我想删除'-'符号,如果它是负数我只是想显示差异。我该如何解决这个问题
谁能帮我做这个...
提前致谢..
this does not show the actual difference, there is slightly difference
in the value.
我已经做了一些测试,但无法重现您的问题。
如果您在 BIDS 中进行测试,我建议您删除缓存,因为这可能是一个潜在的根本原因。
Also i want to remove '-' symbol if it's negative i just want to show
the difference.
您可以使用 Abs()
函数执行此操作,该函数 returns 您输入的绝对值。
你原来的表情会变成:
=Abs(Round(Sum(Fields!LY_Sales.Value, "Ds1"))-Round(Sum(Fields!TY_Sales.Value, "Ds2")))
我的报告 (SSRS 2005) 中有两个 tablix。我想从两个不同的列中减去。我使用以下内容:
=Math.Round(Sum(Fields!LY_Sales.Value, "Ds1"))-Math.Round(Sum(Fields!TY_Sales.Value, "Ds2"))
为了显示列,我使用以下内容:
=Format(Math.Round(Sum(Fields!LY_Sales.Value)),"#,##")
=Format(Math.Round(Sum(Fields!TY_Sales.Value)),"#,##")
示例显示值: 单独的列:LY_Sales - 40,240 TY_Sales - 86,983 差值:-47406
这不代表实际差异,数值略有不同。另外我想删除'-'符号,如果它是负数我只是想显示差异。我该如何解决这个问题 谁能帮我做这个...
提前致谢..
this does not show the actual difference, there is slightly difference in the value.
我已经做了一些测试,但无法重现您的问题。
如果您在 BIDS 中进行测试,我建议您删除缓存,因为这可能是一个潜在的根本原因。
Also i want to remove '-' symbol if it's negative i just want to show the difference.
您可以使用 Abs()
函数执行此操作,该函数 returns 您输入的绝对值。
你原来的表情会变成:
=Abs(Round(Sum(Fields!LY_Sales.Value, "Ds1"))-Round(Sum(Fields!TY_Sales.Value, "Ds2")))