Report Builder 3.0 - How to sum output of expression - sum

We are looking to sum the output of an expression meaning that it does not exist as a field. Is there a way that that we can sum the content of a range of tablix cells?
In the above screen capture i am looking to have the total of <<"Expr">> displayed in the Total column.

No. You need to provide an expression that computes the total directly. You can only reference the contents of cells (using the ReportItems collection) that have scope "higher" than the current scope. In other words, you can reference a total text box in a non-total tablix cell, but you cannot reference a non-total tablix cell in a total text box.

Related

Redaction in Tableau

I am currently in the process of building some Tableau workbooks where we will need to redact visualizations or text tables if the results fall below a certain threshold (e.g. only ten data points are returned after filters are applied). Does anyone know how to create calculated fields or know of other methods to redact in Tableau?
You can create a threshold filter that compares the number of filtered responses to a threshold value set in a parameter.
First, create a parameter with integer data type and set it to the desired threshold. In this example, I called it Count Threshold.
Then create a calculated field for the filter with an equation like the following:
{FIXED: COUNTD([Respondent ID]) >= [Count Threshold]}
(I did this for survey results where we needed to hide results if the filtered number of respondents was fewer than 10.)
For the threshold filter to be applied after your other filters, choose "Add to Context" for your other filters.
I found a partial solution on the Tableau community forum/knowledgebase about redaction that might work for other implementations.
The basic idea is to create two different calculated fields, one which displays a integer value and the other that displays a string value. That way, when both are concatenated in the display you get the desired output without breaking any of the calculated field rules.
So create a calculated field that has a formula like:
IF sum([Datafield_to_Redact]) < 10 THEN "*" ELSE str(sum([Datafield_to_Redact])) END
And another that has a calculated field that has a formula like:
IF sum([Datafield_to_Redact]) < 10 THEN null ELSE sum([Datafield_to_Redact]) END
In the post the attached workbook and screenshot show how the two values are concatenated in the Text mark.
Workbook screen capture

Average of two columns in crystal report using crosstab

I cant get the right Sub Total and Total of this formula
Output is
Formula is ((collections / collectibles) * 100)
Is there a way to change the formula of Sub total and of a column?
I'm using crystal report in vb.net windows application program
This is for simple detail section
Create a "Formula Field" (Not a running total field) called Total
In the Formula Editor grab "Functions" (Middle divider) -> Summary -> Sum -> Sum(fld) and put it in the editor portion
Drag the "Amounts" that you want the total of and and put it in the Sum function
Put this formula field in the footer (It should display the total I believe you want)
Please check this link.
https://www.mindstick.com/Articles/614/running-total-field-in-crystal-report
http://www.dbforums.com/showthread.php?1117914-subtotals-by-page
Edit
If you using cross-tab, then its very easy. Cross-tab given row wise, column wise total and grand -total too.
check this links.
Grand Total Cross Tab rows alongwith columns?
Add "Total" per row and column in Crystal Reports without CrossTab

Spotfire calculated column based on filter

I want to create a calculated column that is equal to the percent of the total of the previous column, but only for the rows that are selected.
For example, the two columns below show rows where I've filtered for only the rows of interest. The sum is accurate, but I want the percent of the total to be only out of sum of the currently selected rows rather than the absolute total (which is how it's currently being calculated). I want the percent of the total to dynamically change depending on what is filtered in the data table. Is this possible?
Image of my 2 columns:
I know spotfire somehow calculates this becuase when I insert a bar graph using % of Total(SumofComponents) the ratio is only out of the current total.
Image of my bar chart:
much like in programming, Spotfire has a rough concept of scope. and unfortunately, calculated columns are above filters in terms of scope; they have no concept of what is and is not filtered.
visualizations themselves, however, do*!
what you can do in this case is to put your expression on the Y axis (it looks like you've done this), and it will respect your selected filters*.
*caveats: there are a few ways that filtering can be negated on a given visualization:
Properties>>Appearance>>Show shadows indicating the unfiltered data. this option shows a grey bar that represents the data hidden by whatever filter selection was made
Properties>>Data>>Limit data using filterings. these options allow the viz to use separate filtering sets ("Filter Schemes" as they're called in Spotfire) or none at all (to ignore filters completely)
Properties>>Subsets. by default there are three subsets: "All Data" which ignores filters, "Not in current filtering" which inverts the filter selection (e.g., if you filter a boolean column to show only TRUE, this chart would show only FALSE), and "Current filtering" which is the default behavior. you can check the online help for additional subsets that you can add.

Multi Record Validation in Oracle Forms

Form Field
I wanted to apply validation on Plan Ratio field if user entered ratio exceed 100 then show error how can I do in when validate trigger as plan ratio is the same field but have different records
You can setup an invisible Calculated Item, that sums up Plan ratio field, name it for instance as SUMMARY_FIELD and then add WHEN-VALIDATE-ITEM trigger for each Plan ratio item of the records like this:
BEGIN
IF :SUMMARY_FIELD>100 THEN
message('nok'); --or whatever alert you like
RAISE Form_Trigger_Failure;
END IF;
END;
PS. How to create Calculated Item:
To create a calculated item:
1. In the Object Navigator, create a new interface item (make sure it is a control item).
Tip: The item's datatype must be compatible with the calculation you wish to use to
compute the item's value. For example, if you wish to compute an item's value with the
Sum function, create an interface item of datatype Number.
2. Double-click the item's object icon to display the Property Palette.
3. Under the Calculation node, set the item's Calculation Mode property to Formula or
Summary.
4. If you set Calculation Mode to:
Formula, click on the Formula property, click the More button to display the Formula
dialog, and type a PL/SQL expression to define the formula. Click OK to compile the
expression.
Summary, use the Summary Function popList to select a summary type, then use the
Summarized Block and Summarized Item popLists to select the block and item whose
values will be summarized to compute a value for the calculated item.

Assigning a value to a variable at the same time an expression is evaluated. Multiple statements on the same expression line? [duplicate]

In a report table there is this formula to calculate a subtotal for an invoice. This is the formula:
=Sum(Fields!LineTotal.Value)
The textbox is called TextBoxSubTotal. I would like to display this in another part of the report such as in the header area where I display that subtotal, tax, shipping charge and also a total due.
Can you tell me how to display this value in TextBoxSubTotal in other parts of the report?
Have you tried creating a report variable? Create a new variable and put the invoice calculation into the expression for the new variable. Then reference the report variable from the two textboxes.
The source for the two textboxes would look something like this:
=Variables!TestVariable.Value
http://msdn.microsoft.com/en-us/library/dd255208(SQL.105).aspx