Reporting services 在SSRS图表中尝试将0作为最小值纵轴
我正在编写一份SSRS报告,该报告要求图表以“M”或“K”表示垂直轴,如0、2M、4M。我得到了一个自定义的格式公式,其中添加了一个带有数字的“M”或“K”——Reporting services 在SSRS图表中尝试将0作为最小值纵轴,reporting-services,ssrs-2008-r2,Reporting Services,Ssrs 2008 R2,我正在编写一份SSRS报告,该报告要求图表以“M”或“K”表示垂直轴,如0、2M、4M。我得到了一个自定义的格式公式,其中添加了一个带有数字的“M”或“K”—— =Switch(Fields!TotalSpendCurrent.Value < 1000, "0.#", Fields!TotalSpendCurrent.Value < 1000000, "#,.#K", true, "#,,M") =开关(字段!TotalSpendCurrent.Value
=Switch(Fields!TotalSpendCurrent.Value < 1000, "0.#", Fields!TotalSpendCurrent.Value < 1000000, "#,.#K", true, "#,,M")
=开关(字段!TotalSpendCurrent.Value<1000,“0.#”,字段!TotalSpendCurrent.Value<1000000,“#,.#K”,true,“#,M”)
但通过这个,我得到了最小值'M'或'K',而不是0
电流输出屏幕
试试这个
=Switch(CInt(Fields!TotalSpendCurrent.Value) < 1000, Format(Fields!TotalSpendCurrent.Value,"0.#"),
CInt(Fields!TotalSpendCurrent.Value) < 1000000, Format(Fields!TotalSpendCurrent.Value,"#,.#K"),
true, Format(Fields!TotalSpendCurrent.Value,"#,,M"))
=开关(CInt(Fields!TotalSpendCurrent.Value)<1000,格式(Fields!TotalSpendCurrent.Value,“0.#”),
CInt(字段!TotalSpendCurrent.Value)<1000000,格式为(字段!TotalSpendCurrent.Value,“#,.#K”),
true,格式(字段!TotalSpendCurrent.Value,“#,、M”))
让我看看它是否有效 你能给我们看一些数据吗!或者您可以使用格式功能根据条件应用!你们可以假设任何超过1000000的数据,我需要在图表的垂直轴上表示它,从0,2M,4M开始。例如,您的总支出最大值为16000000,X轴的月份为6月至12月。因此,如果
字段!TotalSpendCurrent.Value
小于1000,那么您想显示0
对吗?不是M
是的,这就是我想要得到的。看来你对SSRS非常陌生,你能提供当前的实际输出屏幕吗!不,现在它在所有刻度中只显示一个带有M或K的数字-1M,1M,1M。它将显示我们设置为字段的任何值!TotalSpendCurrent.Value
-因此,请检查所有值,或者如果可能,请在此处显示值是否正确,因为它们从0开始到0,但这不起作用。