Percentage representaion in report
I have a report output like this:
| Year | Red | Blue| Red:Blue| Total
1998 501 102 84:16 603
This 84 is 501100/603 and 16 is 102100/603.
How should i go abt to represent 84:16 in my report.
Hi neha,
You can use BEx formula to do this.
Like as you said :
| Year | Red | Blue| Red:Blue| Total
1998 501 102 84:16 603
This 84 is 501100/603 and 16 is 102100/603.
The formula should be for the field redblue as concatenate of two internal variables. v1 and v2
v1 = red* 100 ( red + blue ) and v2 = blue * 100 ( red + blue )
and then you concatenate these two variables as another formula.
thnkx
Similar Messages
-
How to calculate difference and percentage in matrix report dynamic columns in SSRS 2008
Hi Friends,
I need to calculate Difference and Percentage In matrix report SSRS 2008
1) Row grouping based On Product
2) Column Grouping Week and Fiscal Year Current week and Previous Year same Weeks
3)Data Invnetory(Value fileld)
Example:
If value1 and Value2 Available we need to calculate Percentage and Difference.Otherwise Not required NA I need to Show.
For example If Particular week,Current year data is available,Previous year week data is not available No
need to cal Diff and Percentage we need to show Empty.
Below Code is working for If two values is available.
If any one of the fiscal year week data is not there it's taking some garbage values.
I tries with If condition in GetPCT() and GetDiff() It's not working.
Can some one please help me on this.
I am using the custom code
Public Shared Value1 as String
Public Shared Value2 as String
Public Shared previous as string
Public Shared previousweek as string
Public Shared Function GetValue(Value as String,partner as String,Week as String) as String
If partner =previous and Week =previousweek Then
Value2=Value
Else
previous=partner
previousweek=Week
Value1=Value
End If
return Value
End Function
Public Shared Function GetDiff()
return Value2-Value1
End Function
Public Shared Function GetPct()
return (Value2-Value1)/Value1
End Function
How to handle this.
Thank You, Manasa.VHi veerapaneni,
According to your description, if one of the fiscal year week doesn’t have data, the custom code returns false results.
For your requirement, if NULL value exists in the database, we should replace it as zero then perform calculate. So within the code, we should judge whether the value is NULL. To achieve your goal, please refer to the steps below:
1. Create a table like below.
create table dif4
([Product Group] varchar(50),
[Week] varchar(50),
[Fiscalyearweek] varchar(50),
value int
insert into dif4 values
('Desktops','W01','FY14W01',0),
('Desktops','W01','FY15W01',45),
('Desktops','W02','FY14W02',null),
('Desktops','W02','FY15W02',30),
('Desktops','W03','FY14W03',12),
('Desktops','W03','FY15W03',50),
('Notebooks','W01','FY14W01',35),
('Notebooks','W01','FY15W01',56),
('Notebooks','W02','FY14W02',45),
('Notebooks','W02','FY15W02',87),
('Notebooks','W03','FY14W03',75),
('Notebooks','W03','FY15W03',105),
('Tablets','W01','FY14W01',34),
('Tablets','W01','FY15W01',46),
('Tablets','W02','FY14W02',49),
('Tablets','W02','FY15W02',96),
('Tablets','W03','FY14W03',42),
('Tablets','W03','FY15W03',113)
2. Add the custom code in the Report Properties.
Public Shared Value1 as Integer
Public Shared Value2 as Integer
Public Shared previous as string
Public Shared previousweek as string
Public Shared Function GetValue(Value as Integer,product as String,Week as String) as Integer
If Value=Nothing Then
Value=0
End If
If product =previous and Week =previousweek Then
Value2=Value
Else
previous=product
previousweek=Week
Value1=Value
End If
return Value
End Function
Public Shared Function GetPct()
If Value1=0 Then
return 0
Else
return (Value2-Value1)/Value1
End If
End Function
Public Shared Function GetDiff()
return Value2-Value1
End Function
3. Design the matrix like below.
4. Then get the expected results.<o:p></o:p>
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
Percentage calculation in report painter
Friends,
How do we calculate percentage in report painter. I know we can do it using a formula. But when i give the formula as ex: A/B it is giving it as Zero. Do i need to do anything else? A is a subtotal of some accounts and B is a subtotal is some accounts.
Thanks in AdvanceHi,
For decimal places
select the column
go to formatting--> columns
in decimal places put 0.00
This will give u decimals
Points if useful
Regards,
Kiran -
Query help, Percentages / ratio to reports / nests
Hi
I have a query that returns data like this
D_NO POINTS COUNT_POINTS ID_COUNT
4002 L_T_69 12 282
4219 L_T_69 1 151
4228 L_T_69 18 193
4229 L_T_69 7 181
4230 L_T_69 0 197
I need to also output a column that works out a percentage of count_points and Id_count. e.g 12/282 * 100 = 4.2
I had a try with ratio to reports function but no joy for me. I think i need to add in
another nested select or something but what i was trying wasnt working.
Can anyone help.
here is the query so far
SELECT D_NO,
GROUPS.POINTS,
DECODE(GROUPS.POINTS, 'L_T_69' , L_T_69) AS COUNT_POINTS,
ID_COUNT
FROM
(SELECT D_NO,
Count (CASE WHEN VERBAL <= 69 THEN 1
END) AS L_T_69,
COUNT(ID_NUMBER) AS ID_COUNT
FROM TBL_1
WHERE VERBAL IS NOT NULL
group by D_NO)
TBL_1,
( SELECT 'L_T_69' POINTS FROM DUAL )GROUPS
thank youNot sure if this is what you're looking for but it may give you some clues:
select object_type
,has_a_c
,type_total
,round(100 * (has_a_c / type_total),2) ratio
from
select object_type
,sum (case when instr(object_name,'C') <> 0 then 1
else 0
end) has_a_c
,count(*) type_total
from all_objects
group by object_type
OBJECT_TYPE HAS_A_C TYPE_TOTAL RATIO
CONSUMER GROUP 1 2 50
EVALUATION CONTEXT 1 1 100
FUNCTION 50 113 44.25
INDEX 7 20 35
LIBRARY 0 2 0
OPERATOR 1 2 50
PACKAGE 500 1158 43.18
PACKAGE BODY 487 1126 43.25
PROCEDURE 54 86 62.79
SEQUENCE 62 116 53.45
SYNONYM 1060 2298 46.13
TABLE 365 721 50.62
TABLE PARTITION 15 15 100
TYPE 104 272 38.24
VIEW 834 1896 43.99
15 rows selected. -
Hi Expert,
In alv report percentage calculation.Here we have a problem, In total column it will adding the fields
in percentage column, but i want to calculate the percentage in run time.
Example:
A B %*100
10 20 20%
20 40 20%
TOTAL: 30 60 40 -
>it is a total but not percentage
Thank you,
Dinesh.Hi,
1. In the ALV output tab add extra fields that are the same as those on which you are sorting and contain the same values.
2. In the Field Catalog you must add these fields but they must be hidden i.e. no_out = 'X'.
3. These fields must be included in the Sort Catalog with subtot = 'X'.
4. In order to handle the final total line in your layout for the ALV you must set field no_totalline'X' because you are going to be taking this over as well.
5. Create a form called SUBTOTAL_TEXT or similar structured as follows:
form subtotal_text using ep_subtot_line like output_tabes_subtottxt type slis_subtot_text.
In this form you will do the percentage calculation again at total level. The structure ep_subtot_line
will contain a field for each of the fields in your output_tab i.e. ep_subtot_line-sales,
ep_subtot_line-cost and ep_subtot_line-margin. Put the margin calculation into ep_subtot_line-margin.
6. In the eventtab that you pass to the ALV_GRID function module you must create a record with the
field name = 'SUBTOTAL_TEXT' and the field form = the name of the form you created in step 5 above. -
Financial Reporting Studio: Formula for percentages in Dynamic report
Hi,
I have a formula problem in Financial Reporting Studio vers. 9.20.582. I created a dynamic report with four columns:
1. Column: Entities
Entity A, Entity B
2. Column: Accounts
Account A, Account B, Account C
3. Column A: Accounts
Data for a selected period
4. Column B: Formula
Percentage Account B to Account A and Account C to Account A per each Entity
My question is: Could I create a formula in 4th column that shows a percentage of Account B in comparison to Account A for each Entity (everything in one cell)?
Because when I use for example the Formula Percentoftotal([a], [a,1(1)]) it shows for second entity B the wrong percentages.
I hope this was understandable.
Thank you very much for your help.
Chris
Edited by: user8009251 on 14.04.2010 00:45
Edited by: user8009251 on 14.04.2010 00:46Hi
Good question? I think, there is a solution.
You can use the concept of multiple grid here.
Please keep the referred grid at one place and use another grid where you want the formulas.
Please mail me for further info: [email protected] -
Recomended CPU threshold percentages in EarlyWatch reports...
Hi,
In Solution Manager you are able to generate EarlyWatch reports that provide a traffic light for various system performance statistics.
Couold anyone tell me what the general thresholds are (i.e. at what percentage does the light change from green to amber, and amber to red) for CPU utilisation?
thanks
BrianHello Brian,
Unfortunately it is not possible to provide a list of all thresholds used in a EWA session as they are not all stored in a central
repository.
In Solution Manager you can access the software tool that is used to generate the EWA report from within transaction DSWP. From within this tool you can see most of thresholds that are used and the relevant ratings for each check.
You may also view this on your system to see what the actual values are set to.
You may also want to review this note:
322896 - Thresholds for important I/O Events(v$system_event)
Thanks,
Mark -
How to show a value of a field in %(Percentage) in ALV report
Hi,
I would like to show % symbol in my ALV report.
Can anybody please let me know how to do this.
Thanks
Venkatplz refer this..
DATA : v_var(10) TYPE p DECIMALS 2,
v_char(12) .
v_var = '-3.12'.
IF v_var < 0 .
v_char = ABS( v_var ).
CONDENSE v_char.
CONCATENATE '-' v_char INTO v_char.
ELSE.
v_char = v_var.
ENDIF.
WRITE :/ v_var , -
Percentage Rows in Report painter .. Urgent Please
Hi All,
I have rows where I need to calculate percentages, Can you please advise how to calculate.
Loong Hin Pang - I have seen you answering one related query. Can you please help me out.
Points for sure...
Regards,
Kiran.Thank you.
See I have the below Rows
Total Revenue
Cost2
Cost3
Direct Cost
Gross = Total revenue - Direct Cost
Gross % = (Gross/Total revenue ) * 100
I have Columns as with basic Key figures and Formulas
Year(basic key Figure)
Year+1(basic key Figure)
Total = Year + (Year+1)
Its giving me correct values in case of Basic Key figures and not in the formula case.
It giving error when there is formula both in Row and Column.
In the above case last row and last colum. Only Column formula is getting implemented.
Here for example I have mentioned 4 rows and 4 columns.. But I have 15 Rows and 30 columns .. out of which 15 rows and columns have formulas...
% Rows are problem.. which gives me errors... I tried using Special cells, but I am not 100% sure how to use them.
I would be very thankful if you can help me out.. Please -
Percentage Calculation in report
Hi,
My scenario for a report is:
The material is in the rows. MTD % has to be calculated in the columns as below:
There is a key figure Quantity. MTD = Quantity/SUMCT Quant.
The report output is good for this.
QTY(date range) SUMCT(QTY) MTD%=QTY/SUMCT(QTY)
mat1
mat2
mat3
QTY(date range) is user entry.
This view is good.
When date characteristic is used to drill across, to display Daily%, X is being returned in the report.
Where the requirement for Daily% is to be calculated by dividing the Quantity for that Day with the SUMCT of Quantity.
But when date is across,
date1----
date2
QTY---sumctDaily%--QTY-----date3
mat1-q1XX--
q
mat2
mat3
BI 7.0
Can this be resolved without building a structure in the column.
Please suggest.
Raj.Just a suggestion, not sure if it works...
Build Total quantity as a restricted key figure(instead of SUMCT formula) and use constant selection by material. -
Percentages on Summary report rating scale chart
How can I show percentages on the summary when it is printed. Is there an option to have the % added?
There currently isn't a way to do that. Sorry for the inconvenience.
Randy -
How can I calculate column percentage in Essbase report writer?
If you think about sample:basic, I have Q1 and Q2 on my columns and PkgType, Bottle and Can on my rows. i want to create a new column "%" and show the quarterly values as a percent of PkgType for the respective quarter. Essbase Analytical Services Technical Reference has this example but it doesn't work on my report, I don't if it's because I have attribute dimension on my rows:
// This report performs column calculations based on values in a
// report row.
<PAGE (Scenario, Product, Market)
Actual
<COLUMN (Year)
Qtr1 Qtr2
{ DECIMAL 2 3 4 }
{ NAMEWIDTH 22 WIDTH 7 3 4 }
{ ORDER 0 1 3 2 4 5 }
<ROW (Accounts)
{ SAVEROW } Sales
{ CALCULATE COLUMN "%" = 1 % "Sales" 1 }
{ CALCULATE COLUMN "% " = 2 % "Sales" 2 }
{ CALCULATE COLUMN "Avg" = 1 + 2 / 2. }
<DESCENDANTS Accounts
Any help will be much appreciated!sorry that example was based on Demo:Basic and it does work but when apply that logic to what I try to do, it doesn't work.
Please see the PkgType example I sent and I am trying to get this result in Sample:Basic.
Sales New York Product Actual
Qtr1 % Qtr2 %
Pkg Type 7,705 100 9,085 100
Bottle 5,707 74.07 6,727 74.04512933
Can 1,998 25.93 2,358 25.95487067
I tried this script but didn't work:
<PAGE("Measures","Market","Product","Scenario")
<COLUMN("Year")
<ROW("Pkg Type")
"Sales"
"New York"
"Product"
"Actual"
"Qtr1"
"Qtr2"
"Pkg Type"
"Bottle"
"Can"
{ CALCULATE COLUMN "%" = 1% "Pkg Type" 1 }
{ CALCULATE COLUMN "% " = 3 % "Pkg Type" 3 }
! -
REP-1401 error occurs when calculating percentage
Hi all,
I have a formula column with formula like this:
function percent1Formula return Number is
v_percent number;
begin
v_percent := (:qty1 - :qty2) / :qty2 * 100;
return(v_percent);
end;
It gives me REP-1401 Fatal PL/SQL/ error.
Does anyone know how to write percentage formula in report builder?
Thanks in advance,
VanessaHi all,
I have a formula column with formula like this:
function percent1Formula return Number is
v_percent number;
begin
v_percent := (:qty1 - :qty2) / :qty2 * 100;
return(v_percent);
end;
It gives me REP-1401 Fatal PL/SQL/ error.
Does anyone know how to write percentage formula in report builder?
Thanks in advance,
Vanessa Hi Vanessa,
what happens if :qty2 is zero?
it raise zero_divide exception.
so u need to write exception handler for that case
ur code will look like
function percent1Formula return Number is
v_percent number;
begin
v_percent := (:qty1 - :qty2) / :qty2 * 100;
return(v_percent);
exception
when zero_divide then
<do what u want to do in this case>
return(....);
when others
<do what u want to do in this case>
return(....);
end;
hope it is clear.
kiran. -
hi ,
can any one help me the events or any sample codes used for the below reports
1) ABAP Query Report
2) Report Writer / Report Painter
3) logical database reports
thanks
Edited by: Alvaro Tejada Galindo on Feb 4, 2008 2:43 PMABAP/4 Queries
Many times a need arises for SAP Users and Functional Consultants to generate quick reports without getting any ABAP coding done time taken to complete the coding in development, transport and test it in QA system and then transport to production is sometimes too long. In such cases, ABAP/4 query is a tool provided by SAP for generating these kind of reports.
This document aims at explaining the concept of ABAP/4 query in a simple and straight forward manner. The reader of this document should have a moderate knowledge of ABAP concepts and authorizations for understanding the concept of ABAP query.
Type of Report Desired
Before starting to write an ABAP query, its advisable to decide the type of report that the user wants. ABAP query provides the following type of reports:
Basic List Simple report
Statistics Report containing statistical functions like Average &Percentage
Ranked List Report written for analytical purpose
Check this link for more details.
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
Report Writer / Report Painter
Initially, both tools were only available to the FI/CO modules. Later, with the introduction of the Logistics Information System and Flexible Analyses in Release 3.x, the functionality of these tools was further expanded. It still is not widely known that the Report Painter/Writer can be used for reporting against structures other than those delivered in FI and CO
A common misconception in the user community is that Report Painter/Report Writer can only be used to report against a single table. However, some reporting structures do report against multiple tables. For example, CCSS (for Cost Center Accounting) refers to tables COSP, COSS and more, depending on the key figure configuration. Similarly, FI-SL (Special Purpose Ledger) reporting structures include summary and line-item tables (the key figure set determines where the data comes from).
To configure other table joins, views may be created joining the necessary tables, and views can be added to the control tables, via Flexible Analyses in LIS. Report Painter/Report Writer can be used in almost any application area in R/3 to report on currencies and quantities.
CHeck this for more details.
http://sapabap.iespana.es/sap/info/report_painter/report_painter_02.htm
logical database reports
Logical database is another tool for ABAP reports. Using LDB we can provide extra features for ABAP reports.
While using LDB there is no need for us to declare Parameters.
Selection-screen as they will be generated automatically.
We have to use the statement NODES in ABAP report.
If there are many tables the Performance will be slow as all the table data will be read from top node to bottom node .
Check this link.
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db99b435c111d1829f0000e829fbfe/content.htm
Also check this link
http://wiki.ittoolbox.com/index.php/How_many_types_of_reports_are_there_in_ABAP_and_what_is_the_difference_between_them%3F -
Percentage calculation in reprot painter
Friends,
When i am doing percentage calculation in report painter ex: A/B *100, it is giving rounded value like 28% instead of 28.5 or 28.6. Any idea where i need to make changes.
Points will be assigned
ThanksGo to the Formatting-->Columns link in GRR2 screen. On the pop up screen maintain the decimal places you want.
Regards,
Vishal Thakur
Maybe you are looking for
-
Can you choose email address for autofill?
Hi all, Searched and could not find an answer. Can you choose which email address you would like to autofill when completing a form (that is when you have more than one email address in your address card)? Thank you. S
-
I am trying to upload my PDF file from my iBooks but its only giving me the option to upload from my pictures/gallery. How do I get it so I can upload from my iBooks or move my PDF files to my gallery so I can upload it?
-
Hi Experts, When i am going to create delivery, system is giving me fallowing Error. Stock is there, i am not using WBS element anyware still systems is giving me error. Anybody know answer of this error. The detailed description is given bellow, *En
-
Does someone have any list of questions to ask during SEM BPS requirements gathering session for new planning process?
-
Hello @ll, does anybody know how to pack and unpack files with ABAP? Especially handling files in zip- and rar-format. Thanks for any helpfull answers. Chris