Formula for Average
Post Author: kbrinton
CA Forum: Formula
Good Morning,
I have a ticket number field that is a string so all I can do is a count on the field. But I need to do an average. Does anyone know a formula for this?
Post Author: V361
CA Forum: Formula
What does the sting look like ?, is it just numbers, or numbers and characters 888-888-8888, depending on the string, you should be able to convert it to a number (using a formula) and then sum the formula. Please provide an example of your strings if you can.
Similar Messages
-
Need 3 column based on excel formulas, for Average cost of sales.
hii,,
i am using Oracle 10g...
select
pdate,
pcode,
pno,
pqty,
pprice,
trade_amt
, qty_on_hand
, total_cost
, case when pqty < 0
then
lag (avg_price) over (order by pdate)
else
avg_price
end avg_price
, case when pqty < 0
then
lag (avg_price) over (order by pdate)*-pqty
else
avg_price*pqty
end bal_cost
from (
select
pdate,
pcode,
pno,
pqty,
pprice,
pqty*pprice trade_amt,
sum (pqty) over (order by pdate) qty_on_hand,
sum (pqty*pprice) over (order by pdate) total_cost,
sum (pqty*pprice) over (order by pdate) /
sum (pqty) over (order by pdate) avg_price
from
select to_date('12/01/2011','dd/mm/yyyy') pdate, 'PUR' pcode, 1 pno, 10 pqty, 37.425 pprice from dual union all
select to_date('13/01/2011','dd/mm/yyyy'), 'INV', 1, -5, 48.169 from dual union all
select to_date('14/01/2011','dd/mm/yyyy'), 'PUR', 3, 15, 21.628 from dual union all
select to_date('15/01/2011','dd/mm/yyyy'), 'INV', 4, -10, 32.6 from dual union all
select to_date('16/01/2011','dd/mm/yyyy'), 'PUR', 4, 20, 22.33 from dual union all
select to_date('16/01/2011','dd/mm/yyyy'), 'PUR', 5, 35, 19.55 from dual union all
select to_date('18/01/2011','dd/mm/yyyy'), 'INV', 5, -8, 28 from dual union all
select to_date('22/01/2011','dd/mm/yyyy'), 'INV', 6, -12, 32.6 from dual
order BY 1,2,3
this is what the above query returns....( total_cost and avg.price are wrong...so as the bal_cost)
PDATE PCO PNO PQTY PPRICE TRADE_AMT QTY_ON_HAND TOTAL_COST AVG_PRICE BAL_COST
12-JAN-11 PUR 1.000 10.000 37.425 374.250 10.000 374.250 37.425 374.25
13-JAN-11 INV 1.000 -5.000 48.169 -240.845 5.000 133.405 37.425 187.125
14-JAN-11 PUR 3.000 15.000 21.628 324.420 20.000 457.825 22.891 343.373
15-JAN-11 INV 4.000 -10.000 32.600 -326.000 10.000 131.825 22.891 228.915
16-JAN-11 PUR 4.000 20.000 22.330 446.600 65.000 1262.675 19.426 388.517
16-JAN-11 PUR 5.000 35.000 19.550 684.250 65.000 1262.675 19.426 679.905
18-JAN-11 INV 5.000 -8.000 28.000 -224.000 57.000 1038.675 19.426 155.407
22-JAN-11 INV 6.000 -12.000 32.600 -391.200 45.000 647.475 18.222 218.669
8 rows selected.
i expect the result to be like this...
PDATE PCO PNO PQTY PPRICE TRADE_AMT QTY_ON_HAND TOTAL_COST AVG_PRICE BAL_COST
12-JAN-11 PUR 1.000 10.000 37.425 374.250 10.000 374.250 37.425 374.25
13-JAN-11 INV 1.000 -5.000 48.169 -240.845 5.000 133.405 37.425 187.125
14-JAN-11 PUR 3.000 15.000 21.628 324.420 20.000 457.825 25.577 511.545
15-JAN-11 INV 4.000 -10.000 32.600 -326.000 10.000 131.825 25.577 255.773
16-JAN-11 PUR 4.000 20.000 22.330 446.600 65.000 1262.675 23.412 702.373
16-JAN-11 PUR 5.000 35.000 19.550 684.250 65.000 1262.675 21.333 1386.623
18-JAN-11 INV 5.000 -8.000 28.000 -224.000 57.000 1038.675 21.333 1215.961
22-JAN-11 INV 6.000 -12.000 32.600 -391.200 45.000 647.475 21.333 959.969
8 rows selected.to arrive at bal_cost and avg.price, i need 1 more calculation for 'cost_of_sal' which is where i am stuck how to create it first and make use of that..
1) qty_on_hand running balance is OK..
2) cost_of_sale = when qty is -nve (i.e. pcode = 'INV') then take (1 row)previous value of Avg.Price and multiply by sold qty of current row.
3) bal_cost = when qty is +ve (i.e. pcode = 'PUR') then take (1 row)previous value bal_cost and add the trade_amt of current_row OR
when qty is -nve (i.e. pcode='INV') then take (1 row)previous vaue bal_cost and add the cost_of_sale of current_row
finally
4) avg.price = bal_cost / qty_on_hand
just a link showing excel forumlas...http://www.flickr.com/photos/58335021@N07/5356642176/
thank you..hii Etbin..thanks for your effort..but still the result is not as i want, above...
select pdate,pcode,pno,pqty,pprice,trade_amt,qty_on_hand,total_cost,avg_price,bal_cost,
case when pqty < 0
then lag(avg_price) over (order by pdate) * (- pqty)
end cost_of_sale, /* shown as an intermediate result - included in next case */
case when pqty < 0
then lag(bal_cost) over (order by pdate) + lag(avg_price) over (order by pdate) * (- pqty)
else lag(bal_cost) over (order by pdate) + trade_amt
end bal_cost_new, /* shown as an intermediate result - used in next case */
case when pqty < 0
then lag(bal_cost) over (order by pdate) + lag(avg_price) over (order by pdate) * (- pqty)
else lag(bal_cost) over (order by pdate) + trade_amt
end / qty_on_hand avg_price_new
from (select pdate,pcode,pno,pqty,pprice,trade_amt,qty_on_hand,total_cost,
case when pqty < 0
then lag(avg_price) over (order by pdate)
else avg_price
end avg_price,
case when pqty < 0
then lag(avg_price) over (order by pdate) * (- pqty)
else avg_price * pqty
end bal_cost
from (select pdate,pcode,pno,pqty,pprice,
pqty * pprice trade_amt,
sum(pqty) over (order by pdate) qty_on_hand,
sum(pqty * pprice) over (order by pdate) total_cost,
sum (pqty * pprice) over (order by pdate) / sum(pqty) over (order by pdate) avg_price
from
select to_date('12/01/2011','dd/mm/yyyy') pdate, 'PUR' pcode, 1 pno, 10 pqty, 37.425 pprice from dual union all
select to_date('13/01/2011','dd/mm/yyyy'), 'INV', 1, -5, 48.169 from dual union all
select to_date('14/01/2011','dd/mm/yyyy'), 'PUR', 3, 15, 21.628 from dual union all
select to_date('15/01/2011','dd/mm/yyyy'), 'INV', 4, -10, 32.6 from dual union all
select to_date('16/01/2011','dd/mm/yyyy'), 'PUR', 4, 20, 22.33 from dual union all
select to_date('16/01/2011','dd/mm/yyyy'), 'PUR', 5, 35, 19.55 from dual union all
select to_date('18/01/2011','dd/mm/yyyy'), 'INV', 5, -8, 28 from dual union all
select to_date('22/01/2011','dd/mm/yyyy'), 'INV', 6, -12, 32.6 from dual
order by 1,2,3
PDATE PCO PNO PQTY PPRICE TRADE_AMT QTY_ON_HAND TOTAL_COST AVG_PRICE BAL_COST COST_OF_SALE BAL_COST_NEW AVG_PRICE_NEW
12/01/2011 PUR 1.000 10.000 37.425 374.250 10.000 374.250 37.425 374.250
13/01/2011 INV 1.000 -5.000 48.169 -240.845 5.000 133.405 37.425 187.125 187.125 561.375 112.275
14/01/2011 PUR 3.000 15.000 21.628 324.420 20.000 457.825 22.891 343.369 511.545 25.577
15/01/2011 INV 4.000 -10.000 32.600 -326.000 10.000 131.825 22.891 228.913 228.913 572.281 57.228
16/01/2011 PUR 4.000 20.000 22.330 446.600 65.000 1262.675 19.426 388.515 675.513 10.393
16/01/2011 PUR 5.000 35.000 19.550 684.250 65.000 1262.675 19.426 679.902 1072.765 16.504
18/01/2011 INV 5.000 -8.000 28.000 -224.000 57.000 1038.675 19.426 155.406 155.406 835.308 14.655
22/01/2011 INV 6.000 -12.000 32.600 -391.200 45.000 647.475 18.222 218.668 233.109 388.515 8.634
8 rows selected.any other thought..
TY -
PLEASE HELP: PDF Forms, creating average formula for text?
Hello,
I really hope somone can help. I cannot find any answers to my questions on the internet, google etc.
First time using Acrobat. Im pretty quick learning on compters however the formulas my boss has asked me to do I have no idea if they are possible.
We have a report form for exams and each section I need to calculate the average mark for that section.
There are 3 questions for the first section. There are dropdowns for distinction, Merit, Pass and Below pass to select for each questions.
Please see picture attached to show you what I mean.
I want to be able to calculate the most selected/average dropdowns selected and not count the N/A's into award1 field?
The fields must be text and cannot be numbers.
so for example, track 1 got a distinction, track 2 got a Merit, Track 3 got a distiction. all other fields left n/a
is there anyway to do this also is there any way to exactly the same as above as check boxes? - please see picture attached
I appriciate any help. I am working on a mac
Thanks
LaurenThank you so much reply
Yes on the dropdowns the distincion, merit, pass or below pass values are in the correct areas ready for selection. For example on the distiction row you can only drop down for distinction and so on for Merit row dropdowns etc
Check box is the way I rather do it as its quicker, however I created the dropdown option just incase check boxes average was not possible
On the check boxes if i select merit for rtack 1 I would just tick the box and leave the the rest of the colum blank with no ticks. So just by seeing the tick I know its in the merit section for Track 1. However I donts know if I can do an average formula for with check boxes.
If I check boxed/slected distinction for track 1, distnction for track 2 and merit for track 3 (obvisley any box could be ticked depeneding how the exam went so need then all in the script). I would like it to then calculate the avergae mark which would be distinction in the award1 field. While the none ticked boxes or N/A fields not affecting the average.
This is just the start to a huge form Im doing Im dreading the rest of formulas I have to do lol
sorry if im confusing you -
Formula for calculating the average takings for a given day in the week?
I would like to calculate the average takings for each day of the week for a given financial year.
Rick,
I've looked at your document, made some additions and returned it to you. In your document you were not only using AVERAGE, but also MIN and MAX. Unfortunately, MIN and MAX don't have "IF" versions, so they can't be used to selectively operate on data matching criteria in a range.
What I did to accommodate the need for MIN and MAX was to add a column for each criteria, in this case the different days of the week.
In your document you also indicated the need for a Chart to graphically summarize the performance by day of the week. I rearranged your summary stats table to facilitate creating a chart from that table. I chose the mixed category chart with Bars for Min and Max and a Line for Average.
Following are Screen Shots for the modified Data table, the Stats table and the Chart:
The key expressions are:
For Monday receipts:
=IF(WEEKDAY($B)=2, $G, "")
For Monday Minimum:
=MIN(INDIRECT("Ledger::"&CHAR(70+ROW())))
You had pre-filled Column A with 3-letter abbreviations of the Days of the Week. I am not sure this is important, since you could have formatted the Date (Column B) to show the same information, but I didn't like seeing the abbreviations for days that didn't have data entered yet so I replaced the text with an expression...
=IF(LEN(B)>0, LEFT(DAYNAME(WEEKDAY(B)), 3), "")
I seems that you may have filled the table with several months worth of rows of Mon, Tue, etc. Now, if you wish, you can trim the blank rows to just a few and add more as you need them.
Let me know if you have any questions about maintaining the document.
Jerry -
ADDRESS output as an argument for AVERAGE help.
I have column A with ~10,000 entries. I would like to know the average of 100 consecutive entries and use a slider control to supply the starting row number of the 100 rows.
I tried to start by using
=ADDRESS(D4,1,4) where the value of D4 is the determined by the slider control and,
=ADDRESS(D4+100,1,4) in an adjacent cell to give the ending value for the AVERAGE function.
I think the output of the ADDRESS function is seen as a string rather than an argument for the average function. Is this true? Does anyone have any slick ideas for creating a sliding averager?
Thanks for any thoughts.In D3 I stored the number of rows to average
In D4 I stored the first row to average.
In D5 the formula is:
=AVERAGE(OFFSET($A$1,D$4,0,IF(D$3+D$4>ROWS($A),ROWS($A)-$D$4,$D$3)))
If there are D3 rows available starting from row D4 it averages these rows
If there are no such rows, it averages only the existing ones.
I didn't tested the case where D4 is greater than the number of existing rows.
Yvan KOENIG (from FRANCE dimanche 11 janvier 2009 11:58:15) -
How to write formula for 0calweek from 0calmonth
Hi Friends,
I'm doing weekly report. my infocube, data coming from three sources, two sources are ODS. In ODS doesn't have 0calweek only have 0calmonth. When i see my report i can't view those ODS data in the report.
So i want write a formula. How do i write a formula for this.Pls give me the formula.
Thanks & Regards
SiriI got the solution by creating calweek formula based on Syster date.
Siri -
Formula for calculating Quarter value in current calendar Year
Hi All,
I have a requirement where in i need to display values for Q1 of Current Calendar Year, Q1 of Previous Calendar Year,Variance in Value and % Variance in Value...Similarly for Q2,Q3,Q4.
We have built the report directly from Bex Query from the SAP tab in Crystal Reports. The formula for Quarter1,Variances etc are defined in Bex Structures and i am unable to get 'em individually here rather i am getting them as a whole in a single object with the structure name. Now is there a way that i can define my own formula in Crystal Reports so that i can get the values for the constraints defined above???
If yes please give me the syntax or an example formula so that i can work around.
please Help,
Thanks & regards,
R.NWhat fields are you getting?
or what is the data you are working with is it
transID, date, value......
or is it
Q1, Year1, Value....... -
In VB Programming code -- How to access the formula for suppressing a field
In VB Programming code -- How to access the formula for suppressing a field
I am using Crystal Reports 2008 v1
Using VB code, I am attempting to modify a Crystal Report before exporting it into a PDF format and then displaying it on the Web.
My problem is that I am unable to access the formula used to dynamically suppress a field.
The following code is working:
mySections = rd.ReportDefinition.Sections
For Each mySection As CrystalDecisions.CrystalReports.Engine.Section In mySections
' myFieldToChange is a String set to the text of the field I need to adjust the Suppression
iloop = 0
For Each RecObj As CrystalDecisions.CrystalReports.Engine.ReportObject In mySection.ReportObjects
If mySection.ReportObjects.Item(iloop).Name.ToLower = myFieldToChange Then
myTextObject = CType(mySection.ReportObjects.Item(iloop), CrystalDecisions.CrystalReports.Engine.TextObject)
myTextObject.Text = "new field text goes here"
mySection.SectionFormat.EnableSuppress = True
' Here is where I want to change the formula for the Suppression
End if
iloop = iloop + 1
Next
Next
I can not find any reference to the actual suppression formula in the SDK help file.
Note, the EnableSuppress can be set to True for False, but if there is a formula for dynamic suppression, the True or False value is overwritten. The results of the formula determine the suppression.
Is there a way to reference this formula. I know that I can put on in using the Crystal Report Designer software, I need to modify this formula using VB code and the SDK.Hello, Mark;
If you are using the ReportDocument object you do not have access to the Conditional Suppression formula. You can get around it by using a formula field in the report for the supression and then using the FormulaField code to change it at runtime.
If you want to change the supression condition directly at runtime you need to use RAS and the ReportClientDocument.
Elaine -
Is there any functionality for AVERAGE in ALV, like do_sum, subtot?
Hi Experts,
In my_alv report, am doing sub/totals for prices, by using do_sum, subtot functions.........fine. But, I need to do/display the AVERAGE value for Discount % column?
Is there any functionality for AVERAGE in ALV, like do_sum, subtot?
thanqhi
check these links out
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
regards
vijay
reward points if helpful -
How to write a formula for display the value by group
Post Author: abadugu
CA Forum: Formula
Hi
Could any one please help me on writing the formula for the below senario.
I'm creating Crystal report Via using ClearQuest (IBM tool) since this tool is not supporting subreport function. I'm planning to write a formula.
I have grouped report by request_type field (request_type field contains Validation Defect, Production Defect, Known Defect etc..)
right now my report output is grouped by request_type
ex:
Validation Defect
SUMMARY COMMENTS
Production Defect
SUMMARY COMMENTS
my question was
If request_type = Production Defect display pm_number value field otherwise display null
ex
Production Defect
PM# SUMMARY COMMENTS
Validation Defect
SUMMARY COMMENTS
could you please help me writing a formula.
Thanks
AnandPost Author: abadugu
CA Forum: Formula
It worked Thank you and I appreciated your help
Thanks -
Error while Creating a formula for field AZNOR (T-Code : OP17)
Dear Experts,
i am facing a problem in Transaction OP17 while creating a formula for field AZNOR ( No of indivual capacity in work center) in work center (T-Code : CR02) .
It shows the error
The data object "F" has no component called "AZNOR''..
Please let me know the solution..
Thanks & Regards
Birendra KumarHi,
I have the same problem.
Could You tell me witch is the correct origin?
Thanks a lot!
Bye
Laura -
Error in Fast Formula for Supplemental Earnings Elements
Hi,
I have an requirement in Supplement Earning Elements for US Localization. I need to define some Supplement Earning Elements that should comes in Payroll with the extension of existing Elements.
Here are the Steps for setups which i have done so far-
Step 1:Created new Elements with their values with effective dates for existing user Table name
Step 2:Done the setup for New Elements with classification as Supplemental and Category also attached the formula like "FLAT AMOUNT" formula for Calculation rule in Element Earning screen.
Step 3: when i tried to query for the element i have created, the value in Calculation Field is "Elementname_FLAT_AMOUNT_RWSI" which is not same for the existing elements.Existing Element which is of same classification and same category the Calculation rule field is "ElementName_FLAT_AMOUNT".
Step 4: After that i did setup for Element Description and Element Link.
Step 5: Then i have copied the Formula from Existing element(which is previously configured and working fine for the existing elements ), made the modifications for the newly created element. When Compiling the formula ,i am getting an Error "Incorrect Data type"
I have two queries -
1- The setup in Earnings Screen with Calculation Rule is correct or not. As the Calculation Field for newly elements and the existing elements are different (as mentioned in Step 3).
2- Compilation Error "Incorrect Data Types" in Fast Formula.(as mentioned in Step 5).
I m pasting the Fast Formula code here for ready reference
Default for TERMINATED_EMPLOYEE is 'N'
Default for RUN_TYPE is 'R'
Default for FINAL_PAY_PROCESSED is 'N'
default for PAYROLL_TERMINATION_TYPE is 'L'
default for BG_TERMINATION_TYPE is 'L'
default FOR LAST_STANDARD_PROCESS_DATE_PROCESSED IS 'N'
DEFAULT FOR ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD IS 0
DEFAULT FOR ELEMENT_NAME_ADDITIONAL_ASG_GRE_ITD IS 0
DEFAULT FOR ELEMENT_NAME_REPLACEMENT_ASG_GRE_ITD IS 0
DEFAULT FOR ELEMENT_NAME_ASG_GRE_YTD IS 0
DEFAULT FOR ELEMENT_NAME_ASG_GRE_RUN IS 0
Default for PAY_EARNED_START_DATE is '02-JAN-0001' (DATE)
Default for PAY_EARNED_END_DATE is '02-JAN-0001' (DATE)
Default for ASG_NUMBER is ' '
Default for ELEMENT_NAME_ASG_GRE_FYTD IS '0'
Default for CURRENT_ELEMENT_TYPE_ID is 0
Default for GROUP_KF_PAY_FREQUENCY is '0'
DEFAULT FOR Amount IS 0
INPUTS ARE Amount
IF ELEMENT_NAME_REPLACEMENT_ASG_GRE_ITD WAS DEFAULTED OR ELEMENT_NAME_REPLACEMENT_ASG_GRE_ITD = 0 THEN
pay_frequency = GROUP_KF_PAY_FREQUENCY
ELEMENT_TYPE_ID_PASSED = CURRENT_ELEMENT_TYPE_ID
annual_rate = HCS_GET_SUPPLEMENT_RATE(ELEMENT_TYPE_ID_PASSED, PAY_EARNED_END_DATE, 'General Rate')
annual_bal = ELEMENT_NAME_ASG_GRE_FYTD
IF annual_bal = annual_rate THEN
Amount = 0.00
mesg = 'Contract amount '||TO_CHAR(annual_rate)||' fully paid for '||ASG_NUMBER
ELSE
Amount = annual_rate / TO_NUMBER(pay_frequency)
If abs(annual_bal+amount-annual_rate) < 1 then
Amount = annual_rate-annual_bal
IF ELEMENT_NAME_ASG_GRE_RUN=0 THEN
flat_amount = Amount
+ ELEMENT_NAME_ADDITIONAL_ASG_GRE_ITD
+ ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD
ELSE
( flat_amount = Amount )
ELSE
(flat_amount = ELEMENT_NAME_REPLACEMENT_ASG_GRE_ITD + ELEMENT_NAME_ADDITIONAL_ASG_GRE_ITD
+ ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD
clear_repl_amt = -1 * ELEMENT_NAME_REPLACEMENT_ASG_GRE_ITD
IF ELEMENT_NAME_ASG_GRE_RUN = 0 THEN
IF ELEMENT_NAME_ADDITIONAL_ASG_GRE_ITD <> 0 THEN
clear_addl_amt = -1 * ELEMENT_NAME_ADDITIONAL_ASG_GRE_ITD
IF flat_amount < 0 THEN
(IF (PAYROLL_TERMINATION_TYPE WAS DEFAULTED AND
BG_TERMINATION_TYPE = 'A' AND
TERMINATED_EMPLOYEE = 'Y' AND
FINAL_PAY_PROCESSED = 'N') OR
(PAYROLL_TERMINATION_TYPE = 'A' AND
TERMINATED_EMPLOYEE = 'Y' AND
FINAL_PAY_PROCESSED = 'N') OR
(PAYROLL_TERMINATION_TYPE WAS DEFAULTED AND
BG_TERMINATION_TYPE = 'L' AND
TERMINATED_EMPLOYEE = 'Y' AND
LAST_STANDARD_PROCESS_DATE_PROCESSED = 'N') OR
(PAYROLL_TERMINATION_TYPE = 'L' And
TERMINATED_EMPLOYEE = 'Y' AND
LAST_STANDARD_PROCESS_DATE_PROCESSED = 'N') THEN
neg_earn = -1 * ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD
ELSEHuman Resource Management (HRMS)
(neg_earn = flat_amount - ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD
flat_amount = 0
ELSE
(IF ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD <> 0 THEN
neg_earn = -1 * ELEMENT_NAME_NEG_EARNINGS_ASG_GRE_ITD
IF (PAYROLL_TERMINATION_TYPE WAS DEFAULTED AND
BG_TERMINATION_TYPE = 'A' AND
TERMINATED_EMPLOYEE = 'Y' AND FINAL_PAY_PROCESSED = 'N') OR
( PAYROLL_TERMINATION_TYPE = 'A' AND
TERMINATED_EMPLOYEE = 'Y' AND FINAL_PAY_PROCESSED = 'N') OR
(PAYROLL_TERMINATION_TYPE WAS DEFAULTED AND
BG_TERMINATION_TYPE = 'A' AND
TERMINATED_EMPLOYEE = 'Y' AND FINAL_PAY_PROCESSED = 'Y'
AND RUN_TYPE != 'R') OR
( PAYROLL_TERMINATION_TYPE = 'A' AND
TERMINATED_EMPLOYEE = 'Y' AND FINAL_PAY_PROCESSED = 'Y' AND
RUN_TYPE != 'R') THEN
(STOP_ENTRY = 'Y'
mesg = ' ELEMENT_NAME earning has been stopped for this assignment.'
ln_calc_meth = SET_ALTRNT_FLAT_RATE_CALC_METH('NOT_APPLICABLE','NOT_APPLICABLE')
if (1 = 1) then (
soe_run = ELEMENT_NAME_ASG_GRE_RUN
soe_ytd = ELEMENT_NAME_ASG_GRE_YTD
RETURN flat_amount, clear_addl_amt, clear_repl_amt, neg_earn, STOP_ENTRY, mesg
Can anyone help me in solving this problem. Any kind of pointers would be helpful.
Thanks
Pradeep.Hi Pradeep,
Hope you created the new element using the 'Earnings Template' form. If it is created using the 'Earnings Template' form then the calculation rule
should be correct. You said you are modifying the new element formula by using the existing element formula code, have you checked if the
formula code to the old and new once have changed anything other than the element name and standard input elements reference. Try to use
the debug messages in formula and see if that give you any clue. You should find the document in metalink how to debug a formula.
Thanks,
Satin -
How do I get 2 decimal places when using a formula for a quotient? It only gives me whole integers. Most of the results will be less than 1 so I need 2 decimal places
the quotient function returns only whole number portion of the dividing two numbers. If you want the actual decimal value use the divide operator. you enter this as:
A/B
if the numerator is in A1 and the denominator is in B1 you can enter the formula like this:
=A1/B1 -
Need to create a formula for this..
If a project completes on A and the date lies between B & C then "display late by 10 days"
if a project completes on D and the date lies between E & F then "display late by 20 days" and so on , there are 100's of projects and hundreds of completion dates.
what would be the best approach for this?
Any suggestions appreciatedYou really need a Project target or due date and then calculate days late
@Late
If completiondate > targetdate then
datediff("d", targetdate, completiondate) else 0
You can then do banding on this
@overdue
If @late = 0 then 'Not Due' else
If @late in 1 to 9 then 'Less than 10 days overdue'
else
etc.
Hope that helps
Ian -
How can I sum up raws? the Sum function seems to work only on columns. Right now I have to create a separate formula for each raw
Hi dah,
"Thanks, but can I do one formula for all present and future raws? as raws are being added, I have to do the sum function again and again"
You do need a separate formula for each group of values to be summed.
If the values are in columns, you need a copy of the formula for each column.
If the values are in rows, you need a copy of the formula for for each row.
If you set up your formulas as SGIII did in his example (shown below), where every non-header row has the same formula, Numbers will automtically add the formula to new rows as you add them.
"Same formula" in this context means exactly the same as all the formulas above, with one exception: the row reference in each formula is incremented (by Numbers) to match the row containing the formula.
Here the formula looks like this in the three rows shown.
B2: =SUM(2)
B3: =SUM(3)
B4: =SUM(4)
That pattern will continue as rows are added to the table.
Also, because the row token (2) references all of the non-header cells in row 2, the formula will automatically include new columns as they are added to the table.
Regards,
Barry
Maybe you are looking for
-
Best practice question regarding media
Okay, I've finally decided to convert all of my old VHS and MiniDV tapes to .mov files so I can host them on my Plex server for family & friends across the country to be able to view them online. All of these tapes contain various recordings that fea
-
While Pressing Ctrl+v it is pasting twice
The following is my piece of code import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.awt.datatransfer.*; public class CopyPasteExample extends JFrame implements KeyListener JTextArea textArea; String s; JMenu
-
How can I play files that are possibly corrupt (play fine in other apps)?
I have these three mp3 files that I am trying to add to itunes so that I can add them to my ipod. They play fine on winamp and I've listened to the entire song on each track without any problems. Itunes will not let me add them to the library though.
-
Premiere CC 2014 lost FLV rendering option
Is FLV rendering option left out of Premiere Pro CC 2014... or am I missing something? Simply did not find it on the export list anymore...
-
I am asking a question for a change and have not been able to find the search to look for past answers. Anyway, I have a WORD file (269 pages and 23MB) on which I have tried using PDF Maker in WORD 2007 (and 2010). First, using all the variations of