Calculate Grand Total from my total of Each Group in my SSRS Report - ssrs-2008

I want Grand Total of Each Group total as shown in image, but i dont want to repeat my grand total so i have placed it outside of my Group1. How to calculate Grand Total outside of my Group1.
My Report Structure is as Below -
In Quantity Field which is showing -86 , expression i wrote is as follows -
=Last(SUM(Fields!BalanceQty.Value,"Group1"))
In the image - result of Quantity is -86 , but my required Output is 41 i.e. 26 + 16 + 30 -31 .
Any help would be appreciated.

So if I understand correctly, you want to sum the values shown in the cell directly above the grand total cell (in your design).
If that's the case then get the textbox name from the 'cell' you want to sum and then do
=SUM(ReportItems!myTextBoxName.Value)

dont you have on grouping "add totals after" or "add totals before" option. This will show you a grand total; plus and sub-totals for each category.

Related

Pick group totals, grand totals and normal summarization in Tableau

I am trying to calculate average of 2 columns in another column in Tableau but difficult part is grand total is not getting average instead it is the sum of 3rd calculated field.
A B Calculated field
10 5 2
6 3 2
T 16 8 4 (Here I should get 2 instead it is taking sum of column)
Here I am unable to write separate formula for row totals and grand totals, Only one formula (Calculated Field) is allowed and when I am dragging on sheet it is by default aggregating to sum.
Note: I am expert in Crystal and BO but beginner in Tableau.
Update
Code used for LoD
{FIXED [Product Category]: AVG([Sales])}
Below image is what I got after implementation I have tried with 2 columns but the result is same if I use only one column (I am trying to get the average of sales)
You are almost there - the Grand Total by default does a SUM function you just have use the Total All Using --> Average option.
Output : Level wise SUM(Profit) later averaged across columns and rows. (Show Column Grand Total & Show Row Grand Total active)
Update: Answering the question below. To get the Row-wise avg (which is Cat1-vag in this case) you could just drop the measure and change it to AVG(). Since you needed in a Calculated Field you could use a Simple FIXED LOD. You can also uncheck aggregated measures from Analysis dropdown and have no Dimension in column or row like unlike what this example shows and still get three different averages. Cheers.
{FIXED [Cat1]:AVG([Profit])}
Check out this very smart work around from Joe Mako.
https://community.tableau.com/thread/112791
create a calc field like:
IF FIRST()==0 THEN
WINDOW_AVG(SUM([Sales]),0,IIF(FIRST()==0,LAST(),0))
END
duplicate your Category field
place "Category (copy)" on the level of detail
set the compute using for the calc field pill to use "Category (copy)"
The window function in the calculated field only takes into account what's in the view, and aggregate based on those number.

Running Total To Exclude Supressed Value in Crystal Reports

I wish to sum the data on display in my crystal report and not the suppressed data.
I have used the field editor and suppressed tool in the repeated area and I have the below formula for the rows to be suppressed:
{fieldname} = previous {fieldname}
I have read that if I use the running total and enter the opposite formula to subtotal then the subtotal will sum only the values displayed, e.g.
{fieldnmae} <> previous field-name.
However after doing this the first row is now totaling as the previous will be null. The report is sorted so the first row will always be a true value. Is there a formula I can use to display this to sub total? E.g. if Previous {filedname} isnull or {fieldname} <> previous field-name = sub total.
Or is there another solutions to this?
The data looks something like
Row No Value
0 20.00
0 20.00
1 25.00
2 10.00
3 7.50
4 5.00
4 5.00
If row no repeated than do no sub total or display
Many Thanks !!!!!
Chris
Easy way would be don't manipulate on Value column instead manipulate Row No column.
Create a running total and sum when Row No changes which will give correct results

Crystal Reports combine sum total with percentage calculation as string

I have a table of data in Crystal, using the summarise feature I can add a sum total at the bottom of each column but I'd like to add the percentage calculation in brackets next to the sum total.
For example I have,
Column A 432
Column B 191
Is there a formula I can use to show "SumColumn B (SumColumnB/SumColumnA %)"?
Managed to resolve this with the code below:
totext(sum({table1.ColumnB},{table.Site}),0)&" ("&totext(sum({table1.ColumnB},{table1.Site})/sum({table1.ColumnA},{table1.Site})*100,2)&"%)"
Using the table.Site to sum each group separately.
Resulting in following output:
191 (44.21%)

How to Sum the Group value and subtract of received value?

I am generating the crystal report in which grouping by Type ,their are two types income and deduction.Each group have it sum(total).I have applied sum({table.field_to_summarize},{table.field_you_are_grouping_on}).Net amount should be soon at report Footer, sum of income - sum of deduction gives net Amount,
but it give me 0 as value
Group
Income
50
40
10
100 <- sum of the Income
Deduction
40
10
50 <- sum of the Deduction
net 50 <- sum of the Income - sum of the Deduction
Try using running total.
Create two Running total formulas Each to summarize based on type(Income and Deduction). While creating running total in the evaluate condition use "Formula" like
IF Type = "Income" Then True
and similarly for deduction. Place these formulas on the group footer.
Now for your Net Amount formula simply do Runningtotal1 - Runningtotal2 and place it in the report footer.
This should give you the result.
Hope this helps!

Displaying Grand Total in SSRS 2008 R2

I have "Tablix1" which gives sum of the Tablix1TotalAmount field and I have "Tablix2" which gives sum of the Tablix2TotalAmount field. I need to get the sum of these two Total Amounts in say TextBox, Grand total.
Example: Grand Total = Sum of (Tablix1TotalAmount + Tablix2TotalAmount)
Please advice, what expression should I specify in Grand Total.
Thanks,
Ken.
How about something like this?
=SUM(Fields!Tablix1TotalAmount.Value, "Tablix1") + SUM(Fields!Tablix2TotalAmount.Value, "Tablix2")