简体   繁体   English

SSRS图表X轴仅显示开始和结束日期

[英]SSRS chart X-Axis show start and end date only

I have searched and experimented without any success till now. 到目前为止,我一直没有进行任何搜索和试验。 I have a line chart with date values on X-Axis. 我在X轴上有一个带有日期值的折线图。 I would like to display only the start date and end date on the X-Axis. 我只想在X轴上显示开始日期和结束日期。 All other tickmarks and values should be hidden. 所有其他刻度线和值应被隐藏。

I see that there is an option to "Hide Start and End values" in the Chart properties. 我看到在“图表”属性中有一个“隐藏起始值和结束值”选项。 But how do I display only the Start and end date? 但是,如何仅显示开始日期和结束日期?

Any help appreciated! 任何帮助表示赞赏! Thank you :) 谢谢 :)

Please try the following steps :- 请尝试以下步骤:

  • Go to Horizontal Axis Properties. 转到“水平轴属性”。
  • In Axis Options, Select the Axis Type as Scalar. 在“轴选项”中,选择“轴类型”为“标量”。
  • Deselect "Always include zero". 取消选择“始终包括零”。
  • In Minimum box type [First(Sale_Date)] and in Maximum box type [Last(Sale_Date)] . 在“最小”框中,键入[First(Sale_Date)] ,在“最大”框中,键入[Last(Sale_Date)]
  • In Interval box type =datediff("d",first(Fields!OrderDate.Value),last(Fields!OrderDate.Value)) 在“间隔”框中,键入=datediff("d",first(Fields!OrderDate.Value),last(Fields!OrderDate.Value))

Please let me know if it worked. 请让我知道它是否有效。 Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM