Presentation of data in a SSRS chart - reporting-services

Maybe it's strange because I found nothing in the same kind but.. I'm working on SSRS and I have a chart with many categories (A, B, C, ...) on axis X.
I would like to add, on the same axis, a category which is the sum of categories B,C,D for exemple. Is it possible ?
If yes, please tell me how.

I'd calculate the total from MDX query instead of SSRS. Using something like this:
WITH
MEMBER [Measures].[Gender] AS
[Customer].[Gender].currentmember.PROPERTIES("NAME")
SELECT
{
[Measures].[Internet Sales Count],
[Measures].[Gender]
} ON COLUMNS,
nonempty({
[Customer].[Gender].allmembers
}) ON ROWS
FROM [Adventure Works DW2012]
It shows the Sales Count per Gender and All (sum of all genders).
Once you get it in the query you can plot it in a Bar Chart like an additional category.
Share your MDX with us if you get stuck.
ALTERNATIVE: From SSRS create an additional series to display it as a Chart Line:
Use this expression to calculate the total:
=Sum(Fields!Sales.Value,"DataSetName")
Replace date
Let me know if this helps.

Related

How to hide sub-total and total rows in the pivot table of Atoti visualization?

I would like to hide the sub-total and total row from pivot table. Is that possible? How?
Disclaimer: I work on atoti.
There is no feature in the UI to hide the grand total and the sub totals yet. In the meantime, you can change the MDX query stored in the state of your widget.
Here for instance, your MDX should contain something like:
Crossjoin(Hierarchize(Descendants({[SomeDimensionName].[CUSTOMERS].[AllMember]}, 1, SELF_AND_BEFORE)), Hierarchize(Descendants({[SomeDimensionName].[S_MAX_DEGRAD].[AllMember]}, 1, SELF_AND_BEFORE)))
adapt it like that:
Crossjoin([SomeDimensionName].[CUSTOMERS].[CUSTOMERS].Members, [SomeDimensionName].[S_MAX_DEGRAD].[S_MAX_DEGRAD].Members)
and the totals will be gone.

SSRS Group Footer - Expression to show a certain row from dataset

This is a report for Reps showing the customers sales for the previous day and the reps budget for the customer. So in my query I've already calculated the customer total, budget etc. which I managed to put into the report. The problem I have now is that the report's display is toggled so in the group footer I need to display the customer's total as well. I can not sum the column then it will include the budget. I need to input a expression, something like this:
=Tons WHERE ItemDesc = "Customer Total"
I have tried to google for a solution but all I can find is IIF statments. Is there anyway to do this?
Example:
You should be able to use something like this...
=SUM(IIF(Fields!ItemDesc.Value = "Customer Total", Fields!Tons.Value, 0))
All we are doing here is evaluating each row's ItemDesc, if it's "Customer Total" grab the Tons value if not grab 0... then sum all the results.
Thank you Alan Schofield but that did not work. After more searching I went with the lookup:
I added a second dataset with only the totals, then in the expresion for the footer I did the following:
= Lookup (Fields!Customer.Value,
Fields!Customer.Value,
Fields!Tons.Value,
"DataSet2")
This example helped me alot: http://www.sql-datatools.com/2015/07/lookup-functions-in-ssrs.html

How can I add an aggregate percentage to an SSRS report based on two specific columns in a matrix?

I am somewhat new to SSRS and I have built a matrix report that looks fairly simple:
Supplier [AccDate]
[SupplierName] Sum(PurchasingCredit)
Total <<Expr>>
The actual report shows month-by-month sales data for a year in addition to Current YTD and Previous YTD columns (joined via UNION clause in base query) in addition to a column showing Year-over-Year % as difference between the Current YTD and Previous YTD columns (also joined via union).
I was able to apply a dynamic format to the Year-over-Year column using the following expression in the Format property to show the YOY column as a percentage and the others as dollar amounts:
=IIF(Fields!AccDate.Value <> "YOY", "'$' #,0.00;'$' -#,0.00", "#,0.00 %;-#,0.00 %")
The last thing I need to do is to show the column totals, which are working for each column with the exception of the year-over-year percentages using the following:
=IIF(Fields!AccDate.Value <> "YOY", SUM(Fields!PurchasingCredit.Value), 0)
In the year-over-year (YOY) column, a sum of percentages doesn't make sense: I need it to recalculate this value based on the sums of the "CYTD" and "PYTD" columns, but I can't seem to figure it out. Any help would be greatly appreciated. I am guessing it is probably an application of scope, but the MS articles that attempt to explain this are very confusing.

How to hide grand total from chart (ssrs over olap)

I have a report in ssrs 2008, its data source is based on ssas.
I created a pie chart which shows total cost per shape. Dataset of the pie consists of only 4 fields.
Say i have 2 shapes, each of them has total cost. But in addition to that i also get a third slice in the pie which shows total of the other two.
How do i get rid of it?
Ok i figured it out luckily.
The problem was that my dataset returned the total, so i just filtered it in dataset filter expression.
I'm pretty sure there is a way not to return total inside dataset in the first place, if anyone knows, i will be glad to learn
In your dataset you want to change the expression to [Dimension].[Hierarchy].[Attribute].members or [Dimension].[Hierarchy].children. If you do [Dimension].[Hierarchy].members you will get the All member included.
Example: [Date].[Month].members will return each month plus the all member. [Date].[Month].[Month].members will return the members without the All member.

Sum function in Report Builder 3.0

I am creating a report that will sum up all subtotal per MaterialNo/Color/Quality/Size.
Here's my sample report:
Computation will be GrandTotal = sum(Subtotal)
I am using =Sum(Fields!TOTAL_CTN.Value) but the result is 12.
Is there a way to compute using like =sum(subtotal_TextBoxName)?
I'm still not 100% sure of your underlying data and business logic, but here's one approach that might help.
I'm working off the following sample data:
Based on what your description above, it sounds like you have something similar to:
Which gives results:
It seems that you don't actually want to Sum TOTAL_CTN, rather this should be the same for every MaterialNo with the Sum only applied in the Grand Total.
As such you can change the Sub Total aggregation to Max and, since you're using Report Builder 3.0, you can then take the Sum of the group level aggregation values. The report will look like this:
Where the Grand Total expression is:
=Sum(Max(Fields!TOTAL_CTN.Value, "MaterialNoMax"))
In this expression MaterialNoMax refers to the name of the Row Group (based on MaterialNo in my example).
This gives your desired results:
The key here is thinking about what aggregation gets applied at each level and how these roll up to the end total.