Row wise total in column cell
Hi,
I would like to access a total(which is a sum of some 25 rows) in another column cell.
How do i do that.
Regards,
Tulsi.
Hi Tulsi,
Create variable
=If [Product]InList("A";"B";"C") Then Sum([Amount]+[Amount2]+[Amount3])
or use this formula
= If [Product]=[Product] Then Sum([Amount]+[Amount2]+[Amount3])
Regards
Mustafa
Similar Messages
-
Ordering row wise totals in a column.
Hi,
I have a report in Pivot view having two columns namely Count and Category. I have to apply sort on these two columns-first on Count and then on Category.
The Total Count is also calculated row wise. Now when I apply sort on count column, only the values in that column are being sorted and not according to row wise total count. But my requirement is to sort the total count row wise first and then by Category.I am unable to do so.
Kindly provide me the solution to this problem.
Thanks
AnkitaUse RunningSum() function.
Regards,
Rohit -
Row wise total in editable ALV
hello all,
I am workin on editable alv, the user need to enter the values in the editable fields and in the last column(non-editable) i need to populate the total row wise,as soon as user enters a value and goes to next editable cell or on entering a vale and press enter.how to accomplish this task...
with regards,
sandeep akella.
Edited by: sandeep akella on Aug 20, 2009 1:58 PMYou need to Implement the OnCellAction event.follow these steps;
1. Goto WDDOMODIFYVIEW and place the following code
IF first_time IS INITIAL.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_usg_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_usg_alv( ).
DATA lo_value TYPE REF TO cl_salv_wd_config_table.
lo_value = lo_interfacecontroller->get_model(
CALL METHOD lo_value->if_salv_wd_table_settings~set_cell_action_event_enabled
EXPORTING
value = abap_true.
ENDIF.
2. Implement the onCellAction event as follows;
Goto Methods tab, create a new method. Method Type- Event Handler , Event - ON_CELL_ACTION
3. Now in this method retrive the contents of the row and calculate the value as follows.
DATA: l_element TYPE REF TO if_wd_context_element.
DATA:ls_stru TYPE wd_this->element_cn_alv.
DATA: l_node TYPE REF TO if_wd_context_node.
l_node = wd_context->get_child_node( 'CN_ALV' ).
l_element = l_node->get_element( r_param->index ).
l_element->get_static_attributes( IMPORTING static_attributes = ls_stru ).
ls_stru-last_col = ls_stru-col1+ls_stru-col2....+ ls_stru-col5. " add all the cells data
l_element->set_static_attributes( exporting static_attributes = ls_stru ). -
Output data in row wise instead of column
hi all,
i need to get the output data in row wise which is getting now as column wise.
for eg:
below is my final internal table.
HEADING DATE MATNR BUKRS DMBTR
jan/08 200801 567 10 800
feb/08 200802 567 10 900
mar/08 200803 567 10 200
apr/09 200804 567 10 400
the output should come as
MATNR BUKRS Jan/08 Feb/08 Mar/08 Apr/08
567 10 800 900 200 400.
instead of column wise the output should display as row as above.
please help how to get this.
thanks in advanceHi Vignesh,
Please use below program which I created for you reference. It will work for your requirement.
DATA:BEGIN OF it_test OCCURS 1,
date(6),
matnr(5),
bukrs(3),
END OF it_test.
it_test-date = 'jan/08'.
it_test-matnr = '01234'.
it_test-bukrs = 'AE1'.
APPEND it_test.
it_test-date = 'feb8'.
it_test-matnr = '56789'.
it_test-bukrs = 'AE1'.
APPEND it_test.
it_test-date = 'mar8'.
it_test-matnr = '23478'.
it_test-bukrs = 'AE1'.
APPEND it_test.
START-OF-SELECTION.
LOOP AT it_test.
WRITE :/ 'DATE', 'MATNR', 'BUKRS', it_test-date, it_test-matnr, it_test-bukrs .
ENDLOOP.
Output Will be as follows :-
DATE MATNR BUKRS jan/08 01234 AE1
DATE MATNR BUKRS feb8 56789 AE2
DATE MATNR BUKRS mar8 23478 AE3
Please set to resolve if this satisfies your requirement.
Regards
Abhii.. -
hi,
i hav 4 fields among which 3 fields are quantity fields(f1 f2 f3) and i want the total of these threee fields in the fourth field f4....
can anyone explain how to do this.....Hi,
while preparing your final internal table you have to do like bleolw
loop at it_final into wa_final.
wa_final-f4 = wa_final-f1 + wa_final-f2 + wa_final-f3.
modify it_final from wa_final index sy-tabix transporing f4.
endloop.
it works...
Note: F4 will be the filed at the end in your final internal table.
Thanks! -
How to display page wise totals in Smartforms
hi,
I created Tax Invoice for SD my quetion is i have 10 items 5 items are displaying in first page and rest of 5 items are displaying next page.
in first page 5 items i have to display the total amount in first page and same like second page also please help me.
regardsHi,
Create two global data variables called pag_total & currentpage and initialize currentpage as 1.
if currentpage <> sfsy-page.
pag_total = 0.
pag_total = pag_total + column value(which values u want to add).
currentpage = sfsy-page.
else.
pag_total = pag_total + column value(which values u want to add).
endif.
Write these lines in main area table row of that particular column cell and store the SFSY-page value also in a global variable(currentpage).
Then write the pag_total variable in the footer.
Thanks,
Venkat -
is there any method to create row wise running total in Crystal Reports?
>
gourav.sengupta wrote:
> Hi,
>
> I needed a running total but for rows. Therefore if the data set is in the following manner:
>
> Column 1 Column 2 Column 3 Column 4
> A 12 13 14
> B 11 10 19
>
> The the running total will appear as:
> RT 23 23 33
>
>
> Thanks and Regards,
> Gourav
I am confused as to what you want.
Your sample shows sums for collumns, not rows. You do not need a running total for this, just sum them.
If you want to total each row, make a formula that adds them up and place on the row. -
How 2 Change of column wise o/p to row wise output in ABAP?
Hi all,
I am getting the output in column wise as normally but how can I get the ouput in row wise.in ABAP.
its urgent. can any one help me how to change the output layout?
thanks in advance,
Sakthi.Cif it is normal report .then
go through the write statents . one of that is below
Loop at itab .
write : itab .
endloop.
if it is ALV then you have to define an internal table which are the fieldds you want palce in the Row .
so that
data c type i value '1'.
loop at itab .
fieldcatalog-fieldname = itab-field.
fieldcatalog-col_pos = c.
append fieldcatalog to fieldcatalog.
clear fieldcatalog
c = c + 1.
endloop.
so that the Col_pos will be increased and the Column data will be moved into Row .
reward points if it is usefull...
Girish -
In alvs how to do totals by colum wise and row wise
hi,
in alvs how to do totals by colum wise and row wise
could u plz explain clearly with codingHi Rajesh,
Go through these links...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
Reward Points if this helps,
Satish -
(JTable) How can i get the first columns cell in a selected row?
Hello. I am trying to figure out how i can get the first columns cell within a selected row no matter what cell is selected in that row. I have a class that extends AbstractTableModel which represents the table. Now i have another class that extends DefaultSelectionModel. Each model is added to the JTable via setModel(TableModel dataModel), setSelectionModel(ListSelectionModel newModel). Now i don't understand what i have to return from getMaxSelectionIndex(). Any ides? Thanks.
class xTableModel extends AbstractTableModel{
private static String[] cols;
private Object[][] data;
public void setTableModel(Object data[][], String[] cols){
this.cols = cols;
this.data = data;
public String getColumnName(int col){
return cols[col];
public int getRowCount() {
return data.length;
public Object getValueAt(int row, int col) {
return data[row][col];
public void setValueAt(Object value,int row,int col){
data[row][col]=value;
public int getColumnCount(){
return cols.length;
class ColumnListenerModel extends DefaultListSelectionModel{
public int getMaxSelectionIndex(){}int row = table.getSelectedRow();
Object data = table.getValueAt(row, 0); -
I am looking to see if anyone has figured out, from their iPad in Numbers how to calculate percentages or sums totalling other columns or rows?
The issue is I bought the G4 from my buddy a few months ago... the machine has been abused to say the least, both inside and out. It is almost falling apart and has a BUNCH of programs loaded on it. I have always used a PC and am still familiarizing myself with Macs, I need to clean out the machine and dump all the excess applications and files that are causing problems.
I think this is why I am having some trouble. Sometimes it works just fine, but I am only working with a few simultaneous tracks at a time. I am using the virtual instruments at this time but will be running guitars and bass through an external sound card soon. Similar to what you are doing it sounds like.
Anyway, wanted to give you some more insight. Last night it seemed to work alright, I am not going to rush into buying anything until I absolutely have to but want to get some direction as far as what I should be looking at.
Any further input is appreciated, thanks. -
How to print column wise istead of row wise
Hi,
please help on this..
i want to print coloumn wise Employee data instead of row wise.
Keeping Employee name constant i want to print month wise salary..
Like this..
Employee name|Jan-2010-Wages paid|Feb-2010-Wages paid
soon...
Plez help me..
Edited by: user651567 on Feb 28, 2010 5:30 AMPlease post CREATE TABLE and a few INSERT statements as well as your desired output and your database version.
Always put the tag before and after your examples to keep it formatted.
See the FAQ regarding tags: http://forums.oracle.com/forums/help.jspa (scroll a bit down).
You might want to search this forum first (search box is on right side of screen), since your question has been asked and explained before.
Also, regarding string aggregation. see this link explaining various techniques (depending on database version):
http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php -
Need a formula to calulate multiple cells and add the sum total to a cell in a other table
Im a chef and my monthly inventory is a time consuming task. I get invoices from multiple suppliers on each day of the week. I enter them into a spread sheet and then need to add the sum total for all the invoices for say MONDAY. That total needs to be entered into a cell in another table called "daily spend". Is there a formula to automatically add say all the invoices from monday and input the daily spend cell on that table. Here is an example
I created a column B-to give each day a number(sometimes multiple invoices come from the same supplier for each day)<GREEN>..If there was a way to do this differently...Im happy to change the layout of the spreadsheet. I want to add the total $ (column F) for each day together(all the blue fields) and then insert the total into another cell seen in the next table . So in this example its F4+F16+F17=?, ? inserted into N2 of the next table
Thanks so much"I ve finally has a play with the advice you gave me but I have realized that the formula you gave me is for a week....and like I mentioned in my reply to you, one table is weekly the other is monthly....is there a way to overcome this? (my answer to you explains it)"
Hi Gavin,
Unfortunately, the scale of your illustrations in that reply made them difficult (or impossible) to read, even on the Retina screen.
The first formula, used to fill column B, extracts the Weekday number for each date. Since these numbers should be equivalent to the day of the month, You'll need to replace this with a formula that returns the Day value of each date:
Old:
B2: =WEEKDAY(A,2)
New:
B2: =DAY(A)
Fill down to end of column.
Because of the arrangeent of your Data table, you will need to repeat this formula in column H (with references to column G), etc. for each set of dates in the table.
The SUMIF formula in column F is fine as is, except that it assumes all condition data will be in column B of Data, and all data to be summed will be in column F of Data. Since this is obviously not the case for your Data table, you will need a separate iteration of the formula for each week in the table, with the four SUMIF statements enclosed in a SUM statement:
E2: =SUM(SUMIF(Data :: $B,A2,Data :: $F),SUMIF(Data :: $H,A2,Data :: $L),SUMIF(Data :: $N,A2,Data :: $R),SUMIF(Data :: $T,A2,Data :: $X))
Fill down for as many rows as there are days in the month being summarized.
Column references in the formula assume that six columns are used for each week, and that there is no gap in the table between weeks.
Note that the formula does not distinguish between transactions on July 7 and those on June 7 or August 7. Because of this, the Data table must be limited to transactions in a single calendar month.
Regards,
Barry -
Grands totals for % Columns coming incorrect in pivot view .
Hello ,
I have the below scenario . Iam trying to get the calculated grand total for % column . I tired several ways ...like report aggregates enabled in instanceconfig,tried creating cal colum using physical columns as well as logical columns in RPD , changing the aggregation rule. The row wise values (%) are coming correct but iam unable to get correct % grand total (36.8%) instead iam just getting the sum of the % total ( 83.3%) . I have tried the above options in my previous reports and those conditions work perfectly right but for this report they are not able to . kindly please let me know if anybody has a solution for this issue .
Department ...USD CAD Variance (USD/CAD)*100
XYZ 10 20 50%
ABC 25 75 33.3%
Total 35 95 36.8% ( 35/95)
Thanks
KarthikJust to cross check
Do you have following tag in your instanceconfig file ? if its not there then you may encounter grand total incorrect calculations.
<ReportAggregateEnabled>true</ReportAggregateEnabled> -
Caculate the percentages row wise in Result Row
Hello Friends, I have this issue with the sales report , Where the we caculate the percentages of No of Automotive sold / No of Automotive Manufactured
Now we saw that result row for a fiscal yr period calculate the percentages coloumn wise which is incorrect we want to calculate the percentages in the Result Row Header as row wise.
For Example
FISCAL PER/YEAR No of Auto No of Auto Manuf % percent sold
sold
006.2007 10 10 100
007.2007 20 20 100
008.2007 10 20 50%
009.2007 -- -- ---
Result Row === 40 50 cal on column
Correct result should be 40/50 = Total No Of Auto SOLD/ Total No OF Auto Manuf
Thanks
SoniyaHi Soniya,
You result does not give you correct percentage as the Bex can't. You can do this by adding key figure in data target and write a routine for this key figure to calculate percentage based on the previous two key figures. Now use this newly created key figure in your query designer instead of formula. Then u will get correct one.
Thanks
Kiran
Maybe you are looking for
-
XML performance issue in Oracle 8i
I have implemeted the code as per the link http://www.oracle-base.com/articles/8i/parse-xml-documents-8i.php to convert & Load an XML Document to multiple tables in Oracle database. As the number of nodes increase in the xml file, the processing time
-
I have a new email address with which I can sign into iCloud, but once there it says to enter password for my old email address and I forgotten it. What next?
-
Stacked Bar Chart - Values of the Bar
Hi, I have a stacked bar chart with columns as "Project Name", Rows as "Stages", and measures as "Cost". I have different stages in the X axis and the Projects are stacked for each stages. When I scroll my mouse over the stacks it shows me the "Cost"
-
I cannot receive calls when my phone rings some times. When it drops I can hear my own voice thru the receiver. I cannot make calls either
-
Oracle Function with a select into problem
Here is one that I cannot figure out. I'm trying to select the median of a set of events in a purchase qty. I have the selects working in SQL. It returns the correct answer for several sets of test data. However, when I put this into a function to be