SSRS group on only one value on a chart - reporting-services

I have data that I need to present in both a bar and line chart as one this how the chart is laid out in SSRS:
Series Group: Location
Category Group: Year
Category Group: Month
Values (Y Axis): Site_count (Bar chart)
Values (Y Axis):Network_count (Line chart)
My issue is that the Correspondences_count for both of these are being grouped by location. I need to prevent the line chart one being added to the location grouping, so that way it shows a single line.
I found this, that seems to show how this might be able to be done.. . however its not working for me: http://social.msdn.microsoft.com/Forums/en-US/74d9affc-ebf3-485c-988e-f28f7049b600/how-to-make-one-of-the-chart-ignore-series-grouping
Any help is as always appreciated.

The process described in that link should be OK.
Say I have some sample data:
And a simple chart that has the same issue you're describing:
Under the Network_count Chart Series properties, change the Value field expression to:
=Sum(Fields!Network_count.Value, "Month_CategoryGroup")
Here, Month_CategoryGroup is the name of a Category Group:
Now the Network_count value is the total for all Locations:
You'll note I've removed Network_count from the Legend:
This was displaying incorrectly so I just removed it. If you still want a Legend, the easiest thing would be to create something with a tablix/textboxes outside of the chart.

Related

How to generate numbers for showing sequence in SSRS also it should get rearrenge when any field inbetween is missing

I am facing problem in SSRS report for showing sequense numbers as given in image.
when I searched for this issue I got solution as -- RowNumber("DataSetName")
but problem with this is, it generate numbers like 1,2,3..., but I want these numbers in following forms- 1.1, 1.2 or 1.1.1, 1.2.1.
And another problem for me is above function will work if I am having multiple rows in dataset and that dataset is bind with table to show its data, but In my case I am getting all data in single row and out of that I am showing values in textbox using expressions and if that value is empty I am hiding that textbox.
so I am not getting any solution to show sequence number in textbox along with text and how I can rearrenge that numbers if my inbetween textbox is hidden because of no data.
Please provide me solution for above probem.
Image for reference -
Example of data is :
From above table values from "Subheading1" And "Subheading2" will show inside "Heading first" and "Subheading3" And "Subheading4" will show inside "Heading second".
You can concatenate row numbers as strings as follows:
=RowNumber("HEADING") & "." & RowNumber("SUBHEADING")
To ensure numbers are consecutive remove the relevant rows in the source dataset instead of hiding them in the tablix.

SSRS chart, how to prevent horizontal axis categories displaying when value is 0

I've placed a simple bar chart into an SSRS report which is designed to display a series of Consultant Names (along the x axis), with a corresponding count of patients who are flagged as being in the category ">18 Weeks" (on the y axis), based on the following expression:
=SUM(IIF(Fields!RTTWaitGroup.Value=">18 Weeks",1,0))
The chart renders fine. However, a number of the Consultants listed in the chart have a zero count, and therefore are listed across the x axis but with no vertical bar displayed, as you'd expect.
I'd like to configure the chart so that it only displays those consultants that have a count of 1 or more patients.
I'm not overly familiar with the syntax, but I've tried using the following expression in both the Series Properties and Chart Properties 'Visibility' options, to try and suppress x axis categories that are zero, but it doesn't have any effect on the chart:
=iif(Fields!LastConsultant.Value ="",True,False)
Please can anyone advise on correct syntax and appropriate expression field to enter it?
Presumably your consultant names will be in the category group, if so right mouse click and select category group properties.Select Filters, in the expression enter count(fields!patients.value)... for example. Change type to integer , operator to greater than and the value to 0.

Reporting Service months in x-axis

I have a bar chart that shows values for each month in the year. Therefor my bar chart has 12 values on the x-axis. Now they show the numbers 1-12 but I would like instead of numbers to show the name of each month "Jan"-"Dec" or "January"-"December". How do I do this?
Thanks
If you use the month number try set label x-axis to this:
Or you can create a calculated field in the dataset and set it to the above expression then use that field in the x-axis label.
EDIT: I reproduced a possible scenario of your chart.
This is a chart with month number in x-axis, according to your description it is what you are getting now:
The easiest way to get the month name is using a calculated field:
Right click on dataset, go to Fields tab, click add button and type the name to the field in this case MonthName
In Field Source click on right side button Fx for set the expression
and add the following expression:
=Switch(
Fields!MonthNumber.Value=1,"January",
Fields!MonthNumber.Value=2,"February",
Fields!MonthNumber.Value=3,"March",
Fields!MonthNumber.Value=4,"April",
Fields!MonthNumber.Value=5,"May",
Fields!MonthNumber.Value=6,"June",
Fields!MonthNumber.Value=7,"July",
Fields!MonthNumber.Value=8,"August",
Fields!MonthNumber.Value=9,"September",
Fields!MonthNumber.Value=10,"October",
Fields!MonthNumber.Value=11,"November",
Fields!MonthNumber.Value=12,"December",
)
Click Ok, and update your chart to use the MonthName field (not the MonthNumber)
Right click on MonthName in Category Groups Properties.
In sorting tab you should sort by MonthNumber, in my case is [Numero Mes] as follows:
After this you should get the following chart preview.
Let me know if this was helpful.

SSRS - Replace the Chart

I have a question, want some assistance.
Q) My question is that i have a chart in which analyst assigned for many incidents and some analyst have 1 or two incident assigned. just because of this the bar chart looks ugly some time. So thats why i used a new chart to represent Min incident count. But i want there some creativeness, for which i want there a radio button or OnClick event ( I do not know how to use both these. When report runs by default it`ll show Max incidents count chart and when we used radio button it will show Min incidents count chart, on the same chart area no need of new area or on new page.
Kindly help me or refer me some links and with ideas. As i have searched many blogs but i didn`t get any big achievement.
Below is my Simplified query;
SELECT
Count(IncidentDimvw.Id)
,UserDimvw.FirstName AS Analyst
FROM
IncidentDimvw
FULL JOIN WorkItemDimvw
ON IncidentDimvw.EntityDimKey = WorkItemDimvw.EntityDimKey
JOIN WorkItemAssignedToUserFactvw
ON WorkItemDimvw.WorkItemDimKey = WorkItemAssignedToUserFactvw.WorkItemDimKey
JOIN UserDimvw
ON WorkItemAssignedToUserFactvw.WorkItemAssignedToUser_UserDimKey = UserDimvw.UserDimKey
WHERE
WorkItemAssignedToUserFactvw.DeletedDate IS NULL
GROUP BY
UserDimvw.FirstName
Having (Count(IncidentDimvw.Id) = (#Count))
Having Clause is right or wrong, i donot know.
I used the following expresion in series as you suggested.
=iif(Parameters!Count.Value, Max(Sum(Fields!ID.Value)), Min(Sum(Fields!ID.Value)))
Sample data is as folows;
Regards
Muhammad Ahsan
I can think of a couple of ways to approach this:
Dynamic expressions based on parameter
Say you have a simple DataSet like:
And also a boolean parameter called showMax.
We can create a simple bar graph based on this:
The most important thing to note is that Series value is expression-based:
In the above example the expression is:
=IIf(Parameters!showMax.Value
, Max(Fields!value.Value)
, Min(Fields!value.Value))
i.e. when showMax is true, report the Max values, otherwise report the min values.
In this case I've also updated the Axis title, Chart title, and Custom legend text to be expression-based:
Axis Title: =IIf(Parameters!showMax.Value, "Max", "Min")
Chart Title: =IIf(Parameters!showMax.Value, "Max per group", "Min per group")
Custom legend text: =IIf(Parameters!showMax.Value, "Max value", "Min value")
The chart behaviour changes based on what parameter is selected as required:
Set Visibility based on parameter
Another option is simply to have to charts and hide one depending on parameter selection.
For example, for the Max chart the Hidden property can be set to:
=Not(Parameters!showMax.Value)
Setting this property correctly for each report will mean only one is ever displayed to the user, i.e. it will look dynamic.
Either of these options should work; the first keeps the layout simple in the designer makes the chart more complex, the second makes the layout more complex but keeps the charts simple.
Hopefully one option will work for you.

MS Access VBA Cross tab report legend sort order

The problem is hard to explain ,
I have an access report with a stacked bar chart to show the percentage fills over time like the one in this example : Click here
The legend for the chart i have is a number followed by the name, for e.g
1-Mango
2-Apple
3-Banana
etc
I want to sort this according to the above format but when i have more than 10 items the 10-Pineapple comes before 1-mango when it should appear after 9-somefruit .
The underlying query for the access report uses a Cross Tab query in which the items are created as
Column heading:[PrefixPriorityNumber]&"-"&[FruitName]
I even used the Sort:Ascending but it still doesnt affect my custom ordering that i wanted to show.
I also tried to google "sorting alpha numeric strings" but this is clearly more than that.Any assistance is appreciated
The problem is you are getting a text sort. You need to format the prefix number.
Column heading: Format([PrefixPriorityNumber], "00") & "-" & [FruitName]
Either use another digit, as Remou suggests (01 instead of 1) or start using letters. A > 9, B > A, etc.