MS Report Builder using expression for min and max Y axis changes intervals - reporting-services

I am using a log scale on a pagenated report but when trying to set min and max Y-axis values I lose the rounded values on the axis intervals.
Here is a picture of the chart
Formulae for min and max axis values:
=Round(Min(Fields!RelativePrice.Value)*10)/10
=Round(Max(Fields!RelativePrice.Value)*100)/100
Ideally the axis would step in intervals of 10 to 100 and then continue in 100s

Related

How to calculate percent of Total databars in a SSRS matrix?

I create a matrix in SSRS. How can I create a column with percent of each row of the total databars?
I use this expression in the databar values. The percents are correct, but not the lenght of the bars.
=Sum(Fields!YearlyIncome.Value) /
Sum(Fields!YearlyIncome.Value, "bars")
Dataset are from https://www.tutorialgateway.org/data-bars-in-ssrs-matrix-reports/

How to set dynamic axis unit in SSRS Reports?

I have a dataset that contains data in below format: The graph you see on the right is a Line chart that is being used in SSRS report. This is the sample data you see in here below. The graph in SSRS report contains month wise data (as oppose to day wise here) I need to set the axis dynamically (Y-Axis numbers) so that when the numbers get changed the said graph is also updated without updating the Y-Axis manually.
I know I can set the vertical axis property of line chart and then go to "Minimum" and write an expression to bring minimum of one column but I am not sure how to handle MIN function for 3 columns (i.e. Under 5 years, 5-10 years and 10+ years)
TL;DR: I need to change vertical axis to bring MIN -5 values for Last 3 columns combined (in below chart) and MAX +5 values for again those columns. hence MIN should be -5 (i.e. 0-5) and MAX should be 48 (43+5)
I am assuming that setting the Y Axis min and max values to Auto does not work for your situation for whatever reason?
There may be a better way of doing this but this is what I thought of...
=
IIF(
IIF(
MIN(Fields!ColA.Value) < MIN(Fields!ColB.Value),
MIN(Fields!ColA.Value),
MIN(Fields!ColB.Value)
)
< MIN(Fields!ColC.Value),
IIF(
MIN(Fields!ColA.Value) < MIN(Fields!ColB.Value), MIN(Fields!ColA.Value),
MIN(Fields!ColB.Value)
)
, MIN(Fields!ColC.Value)
) -5
and...
=
IIF(
IIF(
MAX(Fields!ColA.Value) > MAX(Fields!ColB.Value),
MAX(Fields!ColA.Value),
MAX(Fields!ColB.Value)
)
> MAX(Fields!ColC.Value),
IIF(
MAX(Fields!ColA.Value) > MAX(Fields!ColB.Value), MAX(Fields!ColA.Value),
MAX(Fields!ColB.Value)
)
, MAX(Fields!ColC.Value)
) +5

Time bands in a column in Report Builder 3.0

Take Datetime and give the half hour band it belongs to, irrespective of the date, just interested in the time.
There is as far as I can see, no time periods in SSRS, I need half hour time periods, that's 48 blocks in a day.
I would like to plot my data in bar chart,the interval for the bar width is along the x axis, the height is the occurrences on the y axis. I need an interval of half hour(the width of the histogram),I don't want to run some IIF/CASE statement, I would rather, convert the DateTime i have to a band on each row of data, what's the best way to output so I get half hour intervals along the X axis.
I don't want to run some IIF/CASE statement
By this I assume you mean you don't want 48 layers of IIF/CASE. Here's an SSRS expression that'll band a datetime just using a single IIF:
=DateAdd(DateInterval.Minute, 0-
IIF(Minute(Fields!DATETIMEFIELD.Value) <= 29, Minute(Fields!DATETIMEFIELD.Value), Minute(Fields!DATETIMEFIELD.Value) -30),
DateAdd(DateInterval.Second, 0-Second(Fields!DATETIMEFIELD.Value) ,Fields!DATETIMEFIELD.Value))
This removes the seconds from the time, and removes as many minutes necessary to get to the previous half-hour. You could likely use the same logic with different syntax as a column in your SQL query, if you prefer.
Use this calculated value for all the relevant parts of your SSRS chart.

Tooltip and Y Axis data Points mismatch SSRS

I have a SSRS report which shows CPU Trend of Quarters in a year. Below is my chart. The chart tooltip values 12% for Q1 and 9% for Q2 which matches the data from the query. But the Axis values are so different and it represent some wrong values.
I' not sure what I missed. I have not add any customization to the Axis so by default it should align to the values of data. Please help to adjust the Y Axis accordingly,.

SSRS How do I add a date range to my x-axis on a line graph?

I have a Line graph and I want the data to show over a range of 60 days back from current date. How do I do this in SSRS?
On your line chart, you would use your date field as the Category. In the Category properties, you go to the FILTER tab and filter your date to be greater than the current date - 60 days.
For the Expression, select your date field, change the Type from Text to Date. Set the Value to =TODAY.AddDays(-60)
For the Chart Values, you would use the field with data that you are trying to show. In my example, I was showing the total (SUM) of Members for each date (MOE_DATE).
For more info, here's the long-winded MSDN on Charts - https://msdn.microsoft.com/en-us/library/dd239351(v=sql.110).aspx
You can also specify the minimum and maximum axis range in axis options. In my example below I set the maximum to the date parameter of the report, and just used a simple datediff formula in the minimum range.