Grand Total function on a report
The Grand Total function is working for only one of the two columns I need it to work in for my report. The data in the column in question is text data that has been CASTed to Integer with no issues but still won't display a grand total. Exporting to Excel works fine for both column totals but that defeats the purpose and is mentioned as a possible troubleshooting clue.
Check over <a href = "http://forums.oracle.com/forums/thread.jspa?threadID=951997&tstart=0" target = "_blank">here</a>
Regards
Similar Messages
-
Hide grand total field on ALV report, But keep the sub total fields
Dear Experts,
1) How to hide grand total field on ALV report, But keep the sub total fields.
2) How to populate rate per ton & calculate total price according to the qty in delivering document.Dear Experts,
1) How to hide grand total field on ALV report, But keep the sub total fields.
2) How to populate rate per ton & calculate total price according to the qty in delivering document. -
Grand Totals functionality under Group and Sort
Hello community,
Does anyone know if there is a solution for rolling up text fields in the summary line item (under the Show Grand Totals functionality under Group and Sort)? I can only find that date fields and formula fields summarize. I would like to be able to summarize all the data in one line items so I wont have a really long schedule and I can present to my end users accordingly.
Thanks,
P6GURUYOUHope I understand, if you have the groups setup, you should be able to (CRXI instructions) right click on the item in the Details line, insert a summary, you can select sum, add the sum to the group. For the locations, insert a summary count, and add that to the groups.
What I do sometimes, is select the option to add summary to all groups, Perhaps change the font to red, I can see the totals
I want, and just suppress the other groups. Just a quick and dirty way to do the totals. -
About Grand Total in Tabular view report
Hi All,
I am working on a tabular report view. While working grand total on few columns, the title "Grand Total" is appearing below the very first column of report. Is any way to set the location of this title below any other column?
One more thing on which i need guidance, I have a calculated column(simply sum of two fact values) and i want to keep away this column from my grand total listed columns. For this i tried to set aggregation rule NULL but it did not work(In such case report column showing nothing. may be null values are coming in this case). I have also tried to CAST the fact numeric columns to CHAR. But it also did not work.
Could you please suggest me a way to do this. I am using OBIEE 11.1.1.3.0 version.
Thanks,
Archie.I am working on a tabular report view. While working grand total on few columns, the title "Grand Total" is appearing below the very first column of report. Is any way to set the location of this title below any other column?You can simply try to format the heading here..by using some left padding and marking the horizontal alignement as centre or something. Play with formatting here..
One more thing on which i need guidance, I have a calculated column(simply sum of two fact values) and i want to keep away this column from my grand total listed columns. For this i tried to set aggregation rule NULL but it did not work(In such case report column showing nothing. may be null values are coming in this case). I have also tried to CAST the fact numeric columns to CHAR. But it also did not work.Only possible if you can push the calculation to RPD and then set aggr rule to NULL in answers ..else no possibility.
Hope answered -
Grand Total For Matrix Based Report
Hi All,
I have a matrix based report with Fields like Country ,Amount and MonthYear
So report looks like below the columns get generated dynamically :
Country Oct 2013 Nov 2013 Dec 2013
India 25,000 25,000 25,000
England 22,000 25,000 30,000
Total 57,000 50,000 55,000
So this works perfectly fine . So next step was to get difference between the months like below :
Country Oct 2013 Nov 2013 Dec 2013 Oct-Nov 2013 Nov - Dec 2013
India 25,000 25,000 25,000 0
0
England 22,000 25,000 30,000 -3000
-5000
Total 57,000 50,000 55,000
Simon_Hou Provided me a custom code for dynamically find the difference between months . Now only requirement left is the sum of the dynamically generated month difference column . As the columns are generated based on a custom code it's not allowing me
to do a sum on it.
Desired Output
Country Oct 2013 Nov 2013 Dec 2013 Oct-Nov 2013 Nov - Dec 2013
India 25,000 25,000 25,000 0
0
England 22,000 25,000 30,000 -3000
-5000
Total 57,000 50,000 55,000 -3000
-5000
Can any one please advice me how to do sum for the dynamically generated custom code column .
Code is below it might help some1 else(Simon_Hou)
Private queueLength As Integer = 2
Private queueSum As Double = 0
Private queueFull As Boolean = False
Private idChange As String=""
Dim queue As New System.Collections.Generic.Queue(Of Integer)
Public Function CumulativeQueue(ByVal currentValue As Integer,id As String) As Object
Dim removedValue As Double = 0
If idChange <> id then
ClearQueue()
idChange = id
queueSum = 0
queueFull = False
CumulativeQueue(currentValue,id)
Else
If queue.Count >= queueLength Then
removedValue = queue.Dequeue()
End If
queueSum += currentValue
queueSum -= removedValue
queue.Enqueue(currentValue)
If queue.Count < queueLength Then
Return Nothing
ElseIf queue.Count = queueLength And queueFull = False Then
queueFull = True
Return (queueSum-currentValue-currentValue)
Else
Return (queueSum-currentValue-currentValue)
End If
End If
End Function
public function ClearQueue()
Dim i as Integer
Dim n as Integer = Queue.Count-1
for i=n To 0 Step-1
queue.Dequeue()
next i
End function
Thanks in Advance
PriyaHi Priya,
According to your description, you want to add a total row at bottom of the matrix. This total row should display the both sum of amount every month and the sum of the difference between months. Right?
Since we have tried the custom code in another similar thread you have posted before (Difference
Between the grouped column) and it works properly. In this scenario, we just need to use the sum function and put it as a variable when calling the custom function in custom code, then we will get the total difference between months. This
case has been tested in our local environment (In this sample, we used the same sample data as the last thread you posted before).Here are steps and screenshots for your reference:
1. Add a row out side of group. Put the expressions into corresponding cells.
2. Save and preview. The result looks like below:
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Ssrs 2008 grand totals of report
In an SSRS 2008 report, I am placing a grand total amount in the report footer since I want the amount at the very end of the report.
The problem is when the report is exported to PDF, the amount is a long ways from where the detail lines are located at.
Thus can you tell me how to make the data in the report footer change to be closer to the detail lines?In your report design make sure you remove as much white space as possible from the main body of the report
-
Grand Total Text is not printing in ALV
Hi all,
I am not able to print Grand Total text in my report
I am not doing subtotal, i am using only grand totals.
So i have used in the following way
WA_FIELDCAT-DO_SUM = GC_X.
GS_LAYOUT-TOTALS_ONLY = GC_X.
GS_LAYOUT-TOTALS_TEXT = 'Totals'(049).
i am using using ALV GRID DISPLAY FM...its displaying the total amount, buts text is missing...
Can any one tell me what else i have to pass in the layout or fieldcatlog or FMHi AMR,
If you use REUSE_ALV_GRID_DISPLAY function module, i think Total text does not come .but if u use REUSE_ALV_LIST_DISPLAY function module Total text comes .
Check this sample program it let u know ..
"Types
TYPES:
BEGIN OF t_pa0008,
pernr TYPE pa0008-pernr,
lga01 TYPE pa0008-lga01,
bet01 TYPE pa0008-bet01,
END OF t_pa0008.
"Work areas
DATA:
w_pa0008 TYPE t_pa0008.
"Internal tables
DATA:
i_pa0008 TYPE STANDARD TABLE OF t_pa0008.
PARAMETERS:
list TYPE c RADIOBUTTON GROUP gr1,
grid TYPE c RADIOBUTTON GROUP gr1.
" ALV Declarations
" Types Pools
TYPE-POOLS:
slis.
" Types
TYPES:
t_fieldcat TYPE slis_fieldcat_alv,
t_events TYPE slis_alv_event,
t_layout TYPE slis_layout_alv,
t_sort TYPE slis_sortinfo_alv,
t_keyinfo TYPE slis_keyinfo_alv.
" Workareas
DATA:
w_fieldcat TYPE t_fieldcat,
w_events TYPE t_events,
w_sort TYPE t_sort,
w_layout TYPE t_layout,
w_keyinfo TYPE t_keyinfo.
" Internal Tables
DATA:
i_fieldcat TYPE STANDARD TABLE OF t_fieldcat,
i_events TYPE STANDARD TABLE OF t_events,
i_sort TYPE STANDARD TABLE OF t_sort.
START-OF-SELECTION.
PERFORM get_data.
END-OF-SELECTION.
PERFORM build_fieldcatalog. "Fieldcatalog
PERFORM build_events. "Events table
PERFORM buid_layout. "Layout structure.
PERFORM build_sort_tab. "To sort table and get subtotal
PERFORM display_data.
*& Form get_data
FORM get_data.
DATA:l_0008 TYPE pa0008 OCCURS 0 WITH HEADER LINE.
SELECT pernr lga01 bet01
FROM pa0008
INTO CORRESPONDING FIELDS OF l_0008
WHERE begda LE sy-datum
AND endda GE sy-datum.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga01.
w_pa0008-bet01 = l_0008-bet01.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga02.
w_pa0008-bet01 = l_0008-bet02.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga03.
w_pa0008-bet01 = l_0008-bet03.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
w_pa0008-pernr = l_0008-pernr.
w_pa0008-lga01 = l_0008-lga04.
w_pa0008-bet01 = l_0008-bet04.
APPEND w_pa0008 TO i_pa0008.
CLEAR w_pa0008.
ENDSELECT.
ENDFORM. "get_data
*& Form build_fieldcatalog
FORM build_fieldcatalog.
PERFORM build_fcat USING:
"Field Int.Table Text
'PERNR' 'I_PA0008' 'PERNR', "Remove this if u dont want in the item table as well as it is there in the header table
'LGA01' 'I_PA0008' 'LGA01',
'BET01' 'I_PA0008' 'BET01'.
ENDFORM. "build_fieldcatalog
*& Form build_events
* text
FORM build_events.
CLEAR:
w_events, i_events[].
w_events-name = 'TOP_OF_PAGE'.
w_events-form = 'TOP_OF_PAGE'.
APPEND w_events TO i_events.
CLEAR w_events.
ENDFORM. "build_events
*& Form display_data
* text
FORM display_data.
DATA:
l_program TYPE sy-repid VALUE sy-repid,
l_fm TYPE RS38L_FNAM.
IF list = 'X'.
l_fm = 'REUSE_ALV_LIST_DISPLAY'.
ELSEIF grid ='X'.
l_fm = 'REUSE_ALV_GRID_DISPLAY'.
ENDIF.
CALL FUNCTION l_fm
EXPORTING
i_callback_program = l_program
is_layout = w_layout
it_fieldcat = i_fieldcat
it_events = i_events
it_sort = i_sort
TABLES
t_outtab = i_pa0008.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. "display_data
*& Form build_fcat
FORM build_fcat USING l_field l_tab l_text.
w_fieldcat-fieldname = l_field.
w_fieldcat-tabname = l_tab.
w_fieldcat-seltext_m = l_text.
IF l_field = 'BET01'.
w_fieldcat-do_sum = 'X'.
ENDIF.
APPEND w_fieldcat TO i_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " build_fcat
*& Form top_of_page
* text
FORM top_of_page.
DATA :
i_header TYPE slis_t_listheader,
w_header LIKE LINE OF i_header.
DATA:l_date1 TYPE datum,
l_date2 TYPE datum.
w_header-typ = 'S'.
w_header-info = sy-title.
APPEND w_header TO i_header.
CLEAR w_header.
w_header-typ = 'H'.
w_header-info = sy-repid.
APPEND w_header TO i_header.
CLEAR w_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_header
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "top_of_page
*& Form BUILD_sort_tab
FORM build_sort_tab .
CLEAR :i_sort[],w_sort.
w_sort-spos = 1.
w_sort-fieldname = 'PERNR'.
w_sort-tabname = 'I_PA0008'. "header table
w_sort-up = 'X'.
w_sort-subtot = 'X'.
APPEND w_sort TO i_sort.
CLEAR w_sort.
ENDFORM. " BUILD_sort_tab
*& Form buid_layout
FORM buid_layout .
w_layout-totals_text = 'Total'.
w_layout-subtotals_text = 'S.Total'.
ENDFORM. " buid_layout
Regards,
Venkat.O -
Grand total in Pivot view in OBIEE
Hi
I have a requirement to show a particulra report in a pivot view whereby I have to keep the yearly values in the "ROWS" portion and the monthly capex values in the "Measures" portion.
The problem is when I am using the grand total functionality, the grand total is coming only for the monthly values which have kept in the "Measures" and not for the yearly capex values in Rows portion even though the aggregation rule is set as "sum".
I have to show the grand total for the yealy capex value as well.Raghu
I tried that option but nothing is coming out.
the requirement is as such : Pivot Table
Year - 2009
-----------Rows -------------------- ----Measure----
Capex id Act Amt. Jan feb Mar
1-5d 500 50 60 70
1-6d 600 50 50 50
Total -------------------<>-----------100 110 120
I want the Total for Act Amt. as well but its not coming -
Matrix row grand total, column grand total
matrix report layout in sql 2008
report shows column a column b column c total
row 1 4 5
8 17
row 2 3 5
2 10
row 3 2 7
6 15
total 9 17
16 grand total column 42
grand total row 42
How do I define the grand total cells to use column totals or row totals? Not just the sum of field in dataset?
Accounting wants justification that column totals add up to row totals.Hi JimHoopsDSC,
Based on my understanding, you want to show grand total columns and grand total rows in the report.
For your requirement, you can create a matrix and add total for row groups and column groups. Then you can add an additional row and populate the total value. Please refer to screenshots below:
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
Hi,
I am using grand total in a tabular report in answers. I have set the aggregation rule to SUM in rpd for the column I would like to total. I am finding that the grand total is not calculating on one specific column, the aggregation rule is set to SUM. Also there were some null fields, I have used IFNULL to set them to zero but the grand total now shows 0.
Can anyone help?
ThanksHi, I am using 10.3.4.1. I am adding <ReportAggregateEnabled>true</ReportAggregateEnabled> to the instanceconfig.xml file to see if that has an impact.
The parameter has resolved the grand total problem
Edited by: sliderrules on 04-Jul-2012 01:26 -
Running Aggregate on grand totals
Hi,
We have requirement where user wants to view running aggregate only on the grand total,when we use running aggregate in OBIEE 11g it calculates running totals each row, however we want the running totals on grand totals.
Another issue is can we show grand total row and running total on the grand total in the same report like the following report.
This is how the report should look however when we apply running aggregate it is calculating the totals for all the cells in OBIEE, Could any one let us know how we can achieve this.
Current report
Branch W1 w2 w3 w4
Abc 10 1 10 11
MNC 20 2 5 10
XYZ 30 3 1 20
QCW 40 5 0 10
Grand Total 100 11 16 51
Expected report with Running aggregate on grand total
Branch W1 w2 w3 w4
Abc 10 1 10 11
MNC 20 2 5 10
XYZ 30 3 1 20
QCW 40 5 0 10
Grand Total 100 11 16 51
Running Total 100 111 127 178
---------------------------------------------------------So having this:
Branch W1 w2 w3 w4
Abc 10 1 10 11
MNC 20 2 5 10
XYZ 30 3 1 20
QCW 40 5 0 10
To achieve what you want you should add a union on the analysis where you set the Branch Column to 'Running Total'.
In the metric you just have to do a RSUM(facts) and they will be aggregated as an RSUM by Week.
Let me know if it works. -
In OBIEE Report Grand Total instead of Average(Average) use Sum(Avg)?
Hi All,
In OBIEE Report Grand Total average always shows Average of average (Default) "avg(avg)" , can i overwrite this functionality to sum of average "sum(avg)".
Thanks in advance
Regards
KandasamyHello,
You can try the following:
Remove the calculate result as setting for the three KFs.
In exception aggregation set property to average with ref char as leave start date.
Check if it works.
If the above dosent work, set reference char to emplyee ID and check.
Either one of them has to work
REgards,
Shashank
Edited by: Shashank Dighe on Apr 2, 2009 9:03 AM -
Crystal Reports Grand Totals and int not working
I am new to Crystal Reports, I am using the Visual Studios version. I have a couple of different questions. My report is a cross tabs report. In one of the cells I want to include a name and the total number of records for the person. To make it visually appear how I want it, I have chosen the Cross-Tab Group Options - Use a Formula. This is what I have entered:
{SP_GET_QATPADJ.AJNAME} + ChrW(13) + ToText(Int({SP_GET_QATPADJ.CNT})) + " Claims", the problem is the .CNT field still shows the .00 after the number. I want it to be a whole number. I have tried several different functions in place of the Int, but it still shows the .00.
My second question, is there any way to modify just one grand total? Within each person of the report there are three rows, number correct, number possible and percent (all of these are returned in the stored procedure). The total column on the right totals the correct & possible okay, but for the percent I would like it to be the percent of the total correct & total possible. LIke the total correct is 13 and total possible is 20, I would like the percent to be 65 (it is showing 234 the sum of the percents for all the columns).Inorder to remove .00 for an integer try this
ToText(Int({SP_GET_QATPADJ.CNT}),"##")
For the other question
Right click on Total Correct value and go to format field and write the suppress condition by clicking on X+2 corresponds to suppress like this
whileprintingrecords;
numbervar TC:=currentfieldvalue;
false;
Now again Right click on Total Possible value and go to format field and write the suppress condition by clicking on X+2 corresponds to suppress like this
whileprintingrecords;
numbervar TP:=currentfieldvalue;
false;
Now right click on percent value and go to format field and click on X+2 corresponding to DisplayString
and write the formula like this
whileprintingrecords;
numbervar TC;
numbervar TP;
totext((TC/TP)*100)+"%"
Hope this would deffinetly help you!!!!
Raghavendra.G -
COMPUTE function: How to get subtotals and GRAND total together?
I am wrtiting a report using SQL and SQL*Plus to get subtotals and a grand total. The COMPUTE function allows me to COMPUTE SUM on a group, but it only gives me subtotals. I'm interested in getting a report with the SUBTOTALS and a final GRAND TOTAL. Can this be done using SQL*Plus?
Here is my current code that gives me subtotals:
COMPUTE SUM LABEL subtotal OF sal ON deptno
SELECT ename, sal, deptno
FROM emp
ORDER BY deptno;
ENAME SAL DEPTNO
CLARK 2450 10
VOLLMAN 5000
MILLER 1300
8750 subtotal
SMITH 800 20
ADAMS 1100
FORD 3000
SCOTT 3000
JONES 2975
10875 subtotal
ALLEN 1600 30
BLAKE 2850
MARTIN 1250
JAMES 950
TURNER 1500
WARD 1250
9400 subtotalHere is the code to give one grand total:
Column DUMMY NOPRINT
COMPUTE SUM OF sal ON DUMMY
BREAK ON DUMMY
SELECT NULL DUMMY, ename, sal, deptno
FROM emp
ORDER BY deptno;
ENAME SAL DEPTNO
CLARK 2450 10
VOLLMAN 5000 10
MILLER 1300 10
SMITH 800 20
ADAMS 1100 20
FORD 3000 20
SCOTT 3000 20
JONES 2975 20
ALLEN 1600 30
BLAKE 2850 30
MARTIN 1250 30
JAMES 950 30
TURNER 1500 30
WARD 1250 30
29025
How can I combine both on one report?Massimo Ruocchio wrote:
Do you like this?I believe OP is looking for both department totals and grand total. Frank already showed how to do it in SQL*Plus. To do it in SQL:
SELECT CASE GROUPING_ID(real_deptno,real_ename)
WHEN 0 then real_ename
WHEN 1 then 'Department ' || real_deptno || ' total'
ELSE 'All department total'
END ename,
SUM(sal),
deptno
FROM (
SELECT deptno real_deptno,
ename real_ename,
sal,
CASE ROW_NUMBER() OVER(PARTITION BY deptno order by ename) WHEN 1 THEN deptno end deptno
FROM emp
GROUP BY GROUPING SETS((),real_deptno,(real_deptno,deptno,real_ename))
ORDER BY real_deptno nulls last,
real_ename nulls last
ENAME SUM(SAL) DEPTNO
CLARK 2450 10
KING 5000
MILLER 1300
Department 10 total 8750
ADAMS 1100 20
FORD 3000
JONES 2975
SCOTT 3000
SMITH 800
Department 20 total 10875
ALLEN 1600 30
ENAME SUM(SAL) DEPTNO
BLAKE 2850
JAMES 950
MARTIN 1250
TURNER 1500
WARD 1250
Department 30 total 9400
All department total 29025
18 rows selected.
SQL> SY. -
OBIEE 10g - Unable to see data in the report view with grand total applied
Hi,
We're facing with a strange issue.
We're working on a report view.
We're able to see data when Grand total is not applied on the report. The moment Grand Total is applied, it's showing either an empty table with NULL values or "No Results" page.
Please help.
Thanks in advance.
-RamaHi Dpk,
Thanks for your reply.
I included it in the instanceconfig.xml, but the issue still exists.
Couple of Observations
#1 - We noticed this issue when we drill down to the level which has really sparse data.
It works fine when we look at the enterprise wide report.
#2 - Works fine with few dimensional attributes and facts on the report
When we add a fact that doesn't have any value at that level, the issue starts to appear.
Thanks in advance.
-Rama
Maybe you are looking for
-
wait wait wait, I must be making a stupid mistake I set my new song tempo at 80.. I make sure its that way in the transport bar, etc etc I audition a loop, like it, drop it in timeline it plays the same tempo as it did in audition. I go to the tempo
-
I am creating forms in Acrobat XI Standard on a Windows 7 64 Bit machine. I am reports that the forms do not work and I am seeing screen prints where the fonts in the form fields are larger and displaced than those in the original form I created. Thi
-
Hi All, is there any way to change the COPA document amount that already posted in the system? plz help me if any body done this previously. for EX: we created the billing document and with that billing COPA document also generated means the amount a
-
Can not add events in my calander
Hi i can not add events to my calander since i updatet my ipod touch to ios 5. Can you help me ?
-
Duplicate of Database - Restore of Specific Tablespaces using RMAN
Hi, is it possible to perform a duplicate of a large database to a point in time (from tape) but only restore specific tablespaces, this database uses partitioned tables for a week of data, each set of partitions have their own tablespace. Thanks.