Displaying Grand Total in SSRS 2008 R2 - ssrs-2008

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")

Related

How to sum in Crystal Report?

Im new to Crystal report. Would appreciate for your help and advice.
I have applied the 1st formula add into the crystal report and trying to sum it if the value is only 1. Attempted to create 2nd formula but having the error.
Formula: test3
if(Count ({CUSTINVOICEJOUR.INVOICEID}, {CUSTINVOICEJOUR.INVOICEID})) = 2 then 1 else 0
sum ({#Test3})
error - this field cannot be summarized
Crystal cannot total formulas that depend on totals.
You can define a numeric variable and increment it in a GF formula using the same conditional logic. Then, display the resulting total in a formula below the "action".
You didn't describe what level of aggregation you are after (grand total across level 1 subtotals? Level 1 total across level-2 subtotals?) so it's difficult to refer to appropriate level of "action" in more concrete terms.

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

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.

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.

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%)

Summation of Sum Formula in Crystal Report

I did a summation in one formula say Formula1. Now i created Formula2 which would do summation of Formula1 as Sum({#Formula1}).
But the crystal report gives the error as "The Field could not be summarized". I understand that summation of sum cannot be done, but i need to do this as Formula1 does summation of columns i.e. brings up Total and Formula2 brings up grand Total.
Please Help!
thanks
Does your Formula1 always evaluate to a numeric value? For example, if you designed Formula1 to display "-" instead of "0", that would cause the problem for Formula2.
If this is a simple summation, you don't even need a Formula2. Crystal has a built-in alternative. On Formula1, go to right-click->Insert->Summary and choose where you want it (Group Footer or Report Footer)
If you copy your summation field and paste it in the Report Footer, it will calculate a grand total--no need to do a sum(sum(field)).