Subtracting a Formula
Dilemma:
I need to subtract one column (drop down box) from another column (drop down box) to have a total and I cannot firure out how to work the formula?
I am using acrobat X pro
Competency Level
Management Competency Level
Self vs.
Manager
2 - Trained
4- Advanced
2
Management Competency Level - Competency Level = Self vs. Manager (formula to be inserted here)
4 - Advanced - 2 - Trained = 2
Can anyone help me?
This should do the trick...
DateAdd("n", -210, {TableName.DateField})
HTH,
Jason
Similar Messages
-
Related toquery formula variable
hi
gurus
my situation is , i am developing a query for hr MASTER DATA
HERE I GOT ROW BY NAME DATE OF BIRTH (EMPLOYEE DOB)
NOW I WANT TO GET AGE ( of employee based on the DOB)
HERE I AM THINKING OF USING VARIABLE LIKE CURRENT MONTH OR CURR DATEIF WE GET THIS WE CAN SUBTRACT BY FORMULA
AGE - DOB
CAN ANY BODY HELP HOW TO GET AGE ROW .
IF USING OF VARIABLE IS CORRECT THEN WHAT IS THE PROCEDURE .
THANKING U IN ADVANCEHi,
Formula Variable would be the first solution coming to the mind in such a case. But with a formula variable, you would be able to create key figure, but i think (not very sure) that you want it as a characteristic to drill down against the DOB.
Now if you want to go with formula variable, here is the approach.
Create a formula variable as replacement path of DOB (DATE type). Now in a formula, subtract it from system date. This would give you the number of days. Use Whole number(number of days/ 365) as the age in years. For months too with the year, it would be ((year*365) - number of days) / 30.
But if you need a characteristic value instead of a key figure, you can instead go for virtual characteristic. In that case, you need to include a characteristic in your cube, not map it in the transformations. Next, you write a BADI or CMOD routine to populate the characteristic during report run time, based on a similar logic as mentioned above. Virtual Characteristics are a bit performancce intensive too, so please be cautioned.
Hope it helps.
Thanks,
Abhishek. -
Issue with subtraction formula in Hyperion report
Hi,
I am facing this peculiar issue. I have to subtract 2 values in 2 columns, A & B and suppose the value in A1 = 0 & B1 = 25 then the result should be -25, which is not. I am getting the resulting value as zero. Did anybody face this issue before?
Please advice
Thanks & Regards,
Gyanesh** Please ignore. It only works for 0. I am doing couple of tests now.
Can you type your formula here?
My test has worked for this formula: 0-[A,3]
Cheers,
Mehmet
Edited by: Mehmet Sevinc on Mar 20, 2012 10:36 AM -
Formula to subtract current month from previous month
Hi
I would like to how to subtract current month from previous month in Crystal 10. Basically am looking at the variations that between the two month . I would also like to know the 12 m onth rolling data formula. Using the same formula, you need to get the difference between the two month.
Any help on this is very much appreciated.
Thanks
Regards
CauveryHi Thanks for reponding.
Though the formula is correct, I don't think it will work out in that way because I have a 12 months rolling data formula and using this formula I have to subtract the current month from previous month.
This the formula that am currently using for 12 months rolling data
{HPD_HelpDesk.Arrival Time} >= DATEADD ("yyyy", -1, CURRENTDATE)
Please advise.
Regards
Cauvery -
BOXI3.0: Formula for subtract/deduct one day or more from date field
Greetings. Its Alias.
I have one question. Actually I already post this question but at designer forum.
I am using SQL.
Example I have Order Date field and from this field I want to subtract the date by minus one day or two days or three days, etc.
I got the solution for designer (example):
DATEADD (dd , -3, EPJ_IPMS.dbo.DO_DATA.DO_DATE_D)
But at webi level it does not work.
I also do not understand why at designer and webi level may have different SQL select statement.
Can someone help me please.
Best regards,
AliasHi there Prashant.
In my case here is I am using Microsoft SQL Server Enterprise Manager and the data is save inside it.
The Designer and Webi are using same SQL database.
I also created an Object at Designer and the result is good.
But say if I don't want to create the object at Designer and let user create their own variables at webi.
Meaning to educate user to put the variable and formula themselves.
This is where the SQL statement a I mentioned earlier cannot be used at webi.
Best Regards,
Alias -
Formula for subtracting time from a datetime field
I have a field that is formatted as a datetime field. I just need to know how to subtract 3.5 hours from this time. How do I write a formula in crystal reports kindly help me.
Thanks in advance
Ramakrishna ReddyThis should do the trick...
DateAdd("n", -210, {TableName.DateField})
HTH,
Jason -
Essbase subtraction formula error in outline
error executing formila [uncovered Accrual] (line 32): invalid object type
for furmula
IF("Medco Price Guarantee"==0)
IF("KSDATE"==1)
IF (@ISMBR(JAN)) "Uncovered Guarantees YTD"->"JAN";
ELSEIF (@ISMBR(FEB)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB");
ELSEIF (@ISMBR(MAR)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB" -"MAR");
ELSEIF (@ISMBR(APR)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB" -"MAR" - "APR");
ELSEIF (@ISMBR(MAY)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB" -"MAR" - "APR" - "MAY");
ELSEIF (@ISMBR(JUN)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB" -"MAR" - "APR" - "MAY" - "JUN");
ELSEIF (@ISMBR(JUL)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB" -"MAR" - "APR" - "MAY" - "JUN" - "JUL");
ELSEIF (@ISMBR(AUG)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB" -"MAR" - "APR" - "MAY" - "JUN" - "JUL" - "AUG");
ELSEIF (@ISMBR(SEP)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB" -"MAR" - "APR" - "MAY" - "JUN" - "JUL" - "AUG" - "SEP");
ELSEIF (@ISMBR(OCT)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB" -"MAR" - "APR" - "MAY" - "JUN" - "JUL" - "AUG" - "SEP" - "OCT");
ELSEIF (@ISMBR(NOV)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB" -"MAR" - "APR" - "MAY" - "JUN" - "JUL" - "AUG" - "SEP" - "OCT" - "NOV");
ELSEIF (@ISMBR(DEC)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB" -"MAR" - "APR" - "MAY" - "JUN" - "JUL" - "AUG" - "SEP" - "OCT" - "NOV" - "DEC");
ENDIF
ENDIF
line by line test shows error at ELSEIF (@ISMBR(JUL)) @SUMRANGE("Uncovered Guarantees YTD","JAN" - "FEB" -"MAR" - "APR" - "MAY" - "JUN" - "JUL");
need to subtract Uncovered Guarantees YTD" by the monthsHello,
There are many errors :
First :
The function @SUMRANGE needs a range of value, meaning a set of value. Here period.
You can for example make a sum from Jan TO Feb by writing "Jan":"Feb"
It will be something like that
IF("Medco Price Guarantee"==0)
IF("KSDATE"==1)
IF (@ISMBR(JAN)) "Uncovered Guarantees YTD"->"JAN";
ELSEIF (@ISMBR(FEB)) @SUMRANGE("Uncovered Guarantees YTD","JAN":"FEB");
ELSEIF (@ISMBR(MAR)) @SUMRANGE("Uncovered Guarantees YTD","JAN":"MAR");
ELSEIF (@ISMBR(APR)) @SUMRANGE("Uncovered Guarantees YTD","JAN":"APR");
ELSEIF (@ISMBR(MAY)) @SUMRANGE("Uncovered Guarantees YTD","JAN":"MAY");
ELSEIF (@ISMBR(JUN)) @SUMRANGE("Uncovered Guarantees YTD","JAN":"JUN");
ELSEIF (@ISMBR(JUL)) @SUMRANGE("Uncovered Guarantees YTD","JAN":"JUL");
ELSEIF (@ISMBR(AUG)) @SUMRANGE("Uncovered Guarantees YTD","JAN":"AUG");
ELSEIF (@ISMBR(SEP)) @SUMRANGE("Uncovered Guarantees YTD","JAN":"SEP");
ELSEIF (@ISMBR(OCT)) @SUMRANGE("Uncovered Guarantees YTD","JAN":"OCT");
ELSEIF (@ISMBR(NOV)) @SUMRANGE("Uncovered Guarantees YTD","JAN":"NOV");
ELSEIF (@ISMBR(DEC)) @SUMRANGE("Uncovered Guarantees YTD","JAN":"DEC");
ENDIF
ENDIF
Second :
You have 3 IF and only 2 ENDIF, so it misses one at the end.
Or if "Medco Price Guarantee" and "KSDATE" are on same dimensions, you can summarize in only one IF by
IF(("Medco Price Guarantee"==0) AND ("KSDATE"==1))
In that case only 2 Endif will be enough.
Finally for your algorithm, you want to substract to JAN all month to the current month. The formula would be:
IF("Medco Price Guarantee"==0)
IF("KSDATE"==1)
IF (@ISMBR(JAN)) "Uncovered Guarantees YTD"->"JAN";
ELSEIF (@ISMBR(FEB)) "Uncovered Guarantees YTD"->"JAN" - "Uncovered Guarantees YTD"->"FEB";
ELSEIF (@ISMBR(MAR)) "Uncovered Guarantees YTD"->"JAN" - @SUMRANGE("Uncovered Guarantees YTD","FEB":"MAR");
ELSEIF (@ISMBR(APR)) "Uncovered Guarantees YTD"->"JAN" - @SUMRANGE("Uncovered Guarantees YTD","FEB":"APR");
ELSEIF (@ISMBR(MAY)) "Uncovered Guarantees YTD"->"JAN" - @SUMRANGE("Uncovered Guarantees YTD","FEB":"MAY");
ELSEIF (@ISMBR(JUN)) "Uncovered Guarantees YTD"->"JAN" - @SUMRANGE("Uncovered Guarantees YTD","FEB":"JUN");
ELSEIF (@ISMBR(JUL)) "Uncovered Guarantees YTD"->"JAN" - @SUMRANGE("Uncovered Guarantees YTD","FEB":"JUL");
ELSEIF (@ISMBR(AUG)) "Uncovered Guarantees YTD"->"JAN" - @SUMRANGE("Uncovered Guarantees YTD","FEB":"AUG");
ELSEIF (@ISMBR(SEP)) "Uncovered Guarantees YTD"->"JAN" - @SUMRANGE("Uncovered Guarantees YTD","FEB":"SEP");
ELSEIF (@ISMBR(OCT)) "Uncovered Guarantees YTD"->"JAN" - @SUMRANGE("Uncovered Guarantees YTD","FEB":"OCT");
ELSEIF (@ISMBR(NOV)) "Uncovered Guarantees YTD"->"JAN" - @SUMRANGE("Uncovered Guarantees YTD","FEB":"NOV");
ELSEIF (@ISMBR(DEC)) "Uncovered Guarantees YTD"->"JAN" - @SUMRANGE("Uncovered Guarantees YTD","FEB":"DEC");
ENDIF
ENDIF
ENDIF
Regards -
Hi Champs,
I have scenario in a routine.
DATA : lv_yss1 TYPE komv-kbetr,
lv_yss2 TYPE komv-kbetr,
lv_div TYPE f,
lv_div2 type komv-kbetr,
lv_one type komv-kbetr value '1.00'.
*In the below code, if lv_yss2 = 21.12 , lv_yss1 = 17.12
lv_div = lv_yss2 / lv_yss1. "ans comes to 1.233645.
lv_div = lv_div - lv_one. " ans comes to 2.33..Exponential values.it should be actualy 0.233645
*Here I tried dividing it by 10 but the numbers changed in exponential values and not in normal ones.
Can anybody help me in getting a normal subtraction value from a routine code.
I need 0.23333 as answer.why are you using floating point? Code below works correctly:
DATA : lv_yss1 TYPE komv-kbetr,
lv_yss2 TYPE komv-kbetr,
lv_div(10) type p decimals 3,
lv_one type komv-kbetr value '1.00'.
*In the below code, if lv_yss2 = 21.12 , lv_yss1 = 17.12
lv_yss2 = '21.12'.
lv_yss1 = '17.12'.
lv_div = lv_yss2 / lv_yss1.
lv_div = lv_div - lv_one.
write lv_div. "0.234 is the (correct) answer.
as does:
lv_yss2 = '21.12'.
lv_yss1 = '17.12'.
lv_div = ( lv_yss2 / lv_yss1 ) - lv_one.
write lv_div. "0.234 is the (correct) answer. -
Subtract two characters in a query
Hi Experts,
I want to know how to subtract two characters in a query could you please give me the solution regarding this.
Ex: posting date - Document date
Regards,
KrishHi,
this can be achieved by creating two formula variables for 2 chars with replacement path and do a subtraction.
http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
Assign points if this is helpful...........
Rgs,
I.R.K -
Why won't 'IF-Statement' Formula work for an entire column?
I am trying to make an IF formula subtract a cells value from another cells value, creating a 'balance'. The formula is working when selecting one cell for each part of the formula, but is not working when I try to use the formula for multiple cells (entire column). The formula I am using for single cells is as follows:
=IF(Monthly Timeline :: F2="Citi",Monthly Timeline :: D2+1000,1000)
The formula works with way, when I select the pop-up menu in F2 to say "Citi" it will add the value of D2 to 1000 and give me a proper solution, but when I change it to the entire column as follows:
=IF(Type="Citi",Amount+1000,1000)
The formula for entire columns 'Type' and 'Amount' does not produce a proper solution, it will display 1000, no matter how many values in the 'Amount" column have "Citi" selected in the pop-up menu in the 'Type' column.
I know there is a way to make this formula work but I can't seem to figure out what I am doing wrong any help would be greatly appreciated.
Thanks!the function if() does not apply to a column. the functions sumif() and sumifs() do apply to columns. You can get detailed information regarding these functions in the function browser. To open the function browser select the menu item:
"View > Show Function Browser"
OR dowload the free function reference from Apple here:
http://support.apple.com/manuals/#productivitysoftware
The document is titled "iWork '09 Formulas and Functions User Guide"
There is also a User Duide you may find helpful: "Numbers '09 - User Guide" -
USE of PREVIOUS command to eliminate duplicate records in counter formula
i'm trying to create a counter formula to count the number of documents paid over 30 days. to do this i have to subtract the InvDate from the PayDate. and then create a counter based on this value. if {days to pay} is greater than 30 then 1 else 0.
then sum the {days to pay} field to each group. groups are company, month, and supplier.
becuase invoices can have multiple payments and payments can have multiple invoices. there is no way around having duplicate records for the field.
so my counter is distorted by by the duplicate records and my percentage of payments over 30 days formula will not be accurate do to these duplicates.
I've tried Distinct Count based on this formula if {days to pay} is greater than 30 then . and it works except that is counts 0.00 has a distinct records so my total is off 1 for summaries with a record that (days to pay} is less than or equal to 30.
if i subract 1 from the formula then it will be inaccurate for summaries with no records over 30 days.
so i'm come to this.
if Previous() do not equal
then
if {day to days} greater than 30
then 1
else 0.00
else 0.00
but it doesn't work. i've sorted the detail section by
does anyone have any knowledge or success using the PREVIOUS command in a report?
Edited by: Fred Ebbett on Feb 11, 2010 5:41 PMSo, you have to include all data and not just use the selection criteria 'PayDate-InvDate>30'?
You will need to create a running total on the RPDOC ID, one for each section you need to show a count for, evaluating for your >30 day formula.
I don't understand why you're telling the formula to return 0.00 in your if statement.
In order to get percentages you'll need to use the distinct count (possibly running totals again but this time no formula). Then in each section you'd need a formula that divides the two running totals.
I may not have my head around the concept since you stated "invoices can have multiple payments and payments can have multiple invoices". So, invoice A can have payments 1, 2 and 3. And Payment 4 can be associated with invoice B and C? Ugh. Still though, you're evaluating every row of data. If you're focus is the invoices that took longer than 30 days to be paid...I'd group on the invoice number, put the "if 'PayDate-InvDate>30' then 1 else 0" formula in the detail, do a sum on it in the group footer and base my running total on the sum being >0 to do a distinct count of invoices.
Hope this points you in the right direction.
Eric -
How do I use Aggregate formulas with multiple measures from different tables?
I have three measures:
Cash - this sums the £ column in my 'Cash' table.
Online - this sums the £ column in my 'Online'
table
Phone - this sums the £ column in my 'Phone'
table
How do I now do aggregate formulas that combine this three measures, for example:
Find the MIN or MAX of the three measures
Average the three measures
I have worked out how to use simple aggregation like add, subtract etc through the CALCULATION formula, but doing the average or MIN/MAX does not work.
Thanks.Hi, thanks for the suggestions.
Re: Julian
I had thought about this method, unfortunately it is not always three measures so this doesn't work.
Re: Tim
I was not aware of the APPEND formula however I will definitely give it a try and report back - I can see this one working.
Re: Michael
Apologies, I have never found a an easy way of simulating some of my issues since it would mean creating a new power model and establishing quite a number of relationships. I definitely see the benefit when posting on the forum since it makes my issue far more
accessible, unfortunately when I've posted before I've generally been racing against time and not had time to prepare this anonymised data. Is there a quick way of doing it? -
Formula to calculate two fiscal year/period difference for non null quantit
We'd like to have a query result like the following:
Person -- Jan_2007 -- Feb_2007 -- Mar_2007 -- No. of Months
Tom --- 21 --- 54 --- 10 --- 2
John --- 0 --- 3 --- 15 --- 1
In the above query, the row is sales persons, the 1st three columns list the sales quantity by each sales person restricted by fiscal year/period and we would like to create 4th column "No. of Months" to calculate (will use formula) the month span (difference) for each sales person from his last sale activity (the last month he performed sales) and the 1st sale activity (the first month he performed sales) as listed in the above query result, e.g., Tom performed his first sales (sales quantity: 21) in the month of January of year 2007, and he performed his last sales (sales quantity of 10) in the month of March, 2007, then the "No. of Months" column value for Tom is 2. The calculation formula will be performed based on the last quantity value (> 0) to trace it's corresponding column fiscal year/period value (max of the fiscal year/period value with quantity value >0) and on the 1st quantity value (>0) to trace it's corresonding column fiscal year/period value (min of the fiscal year/period value with quantity value >0) and then do the subtraction between the max of the fiscal year/period value and the min one.
Would be appreciated if BEx experts here give the detailed steps on how to build up this formula to calculate the number of month difference and we will give you reward points!
Edited by: Kevin Smith on Mar 18, 2008 1:47 PMhi Danny,
I only gave an example of 3 columns, but actually, yes, the report can have more than 12 months, e.g. from Jan_1999, Feb_1999, ..., Mar_2011, Apr_2011.
In our simple example of 3 columns for the three consecutive months, if John had (3)(0)(15), then the No. of Months is 2, or the last month value he performed sales and 1st month he performed sales.
You said macro in Excel sheet? Not sure if macro will work on web since we will eventually run the reports on web browser, therefore we still prefer using Formula.
Any idea/solution?
Thanks! -
Problem with combination of two working query formulas
Hey guys,
I have a problem in building a formula correctly with the BEx formula logic. I am sure, you can help me with this.
Right now I have four columns in my query. The first column (Actual) displays actual amounts either in local (10) or reporting (25) currency type depending on the optional selection either in the variable screen or in the free characteristics filter. The second column (Actual with Budget exch. rate) always shows the actual amounts with the budget exchange rate of the reporting currency. The third column (Budget) is build in the same way as the first column, but shows budget amount data. In the fourth column (Variance) the variance between budget and actual data should be calculated, but here lies the problem:
The formula should differentiate the chosen columns for the calculation depending on what currency type is selected either from the optional variable selection before the query is executed or from the free characteristics filter. So if I select currency type 10 it should calculate the variance by subtracting the budget column from the first column, but if I select currency type 25 it should subtract the budget columng from the second column.
I have implemented a formula which works already, but not for both selection possibilities (variable screen or free characteristics filter). Either the formula works when I input a currency type in the variable selection screen or when I select a filter value in the free characteristics filter. However, I need to combine both formulas in one working formula so that the user can choose if he wants to filter the currency already in the variable screen in the beginning or in the filter after query execution. Here are the two formulas which I need to get combined into one formula:
Used Variables:
VScreen_Selection --> value from the key of the optional Currency Type Variable from the Variable Selection Screen
Filter_Selection: --> value from the key of the InfoObject Currency Type
Formula for Variable Screen Selection:
(VScreen_Selection == 10) * (Budget - Actual) + (VScreen_Selection == 25) * (Budget - Actual with Budget exch. rate)
Formula for Free Characteristics Filter Selection:
(Filter_Selection == 10) * (Budget - Actual) + (Filter_Selection == 25) * (Budget - Actual with Budget exch. rate)
Can you help me to combine both Formulas? I can't believe that this is too difficult. Many Thanks in advance.
Best Greets,
NorbertHello.
Did you try this:
Formula 1: Hidden
(VScreen_Selection == 10) * (Budget - Actual) + (VScreen_Selection == 25) * (Budget - Actual with Budget exch. rate)
Formula 2: Hidden
(Filter_Selection == 10) * (Budget - Actual) + (Filter_Selection == 25) * (Budget - Actual with Budget exch. rate)
Formula 3:
(Filter_Selection <> 10) * (Filter_Selection <> 25) *Formula 1 +
(VScreen_Selection <> 10) * (VScreen_Selection <> 25)*Formula 2 -
Date Difference between to date formula variable
Hi Expert,
I have create two formula variable one for Document Date and another one for Goods reciept date
and through formula variable I am subtracting these two formula variable and getting the no. of days between
document date and GR date.
This Shows me the correct value for one document date because i am filtering my query according to document
date,
while i am giving the date range for document date is shows me incorrect result. bucause document date formula
variable contains only one date.
Eg. i am giving the document date range like 01.02.2010 - 28.02.2010.
In document date formula variable it contains only 01.02..2010 and GR date formula variable it contain correct
value, thats why the date difference is incorrect because those PO which has PO date like 12.02.2010 for that Doc
formula variable bring the same date like 01.02.2010.
Please tell me the solution
Thanks and Regards
Lalit KumarHi Expert,
Actually i have created two formula variable on for PO date and another for GR date
and i've restrict the query through PO date.
while i am taking the single PO date in Selection parameter it showing me correct difference
eg: Selection Parameter for PO: 01.01.2010
But while i am taking the date interval for PO date
eg: 01.01.2010-30.01.2010
PO No: XXXXX123 , Doc date: 01.01.2010 GR date: 7.01.2010 then date difference is : 6
PO No: XXXXX432, Doc date: 03.01.2010 GR date: 8.01.2010 then date difference is : 7 but it is 5
Thanks and Regards
Lalit Kumar
Maybe you are looking for
-
"command disabled" when setting IP address on AIR-LAP1252G-A-K9
Hi, I am trying to set ip address on cisco ap AIR-LAP1252G-A-K9 using the "lwapp" command but get message "command is disabled" I am connecting via console cable to ap. I have already reset ap to defaults. Not sure why I'm getting this error "command
-
STATIC TIME STAMP IN MULTIPLE COLUMNS
I have a single spreadsheet for Monday - Friday. There are multiple columns for each day. It has been asked of me the following: When the customer name is typed for the first time in columns: E, T, AH, AV, BJ rows 5-28 then the static date & time
-
IWork 09 Disc install not activated after running iWork trial!
Can anyone help me with an iWork 09 disc installation? I downloaded the iWork 09 trial onto my MacBook Pro 13" (mid 2010) and used it successfully for the 30 days. I then purchased the iWork 09 boxed DVD. (Before inserting the DVD and installing iWor
-
Many programs not opening after 10.4.9
Only on my desktop dual processor after the 10.4.9 upgrade my Adobe photoshop and Corel painter and Appleworks will not open, my epson scanner will not open. There are others I haven't discovered. IPhoto opens and also Preview. On my ibook I haven't
-
A low-level exception occurred in Importer FastMPEG
I am having serious problems with a wedding project. When I started it a few weeks ago it was all going ok when all of a sudden some of the files came up pixelated and blocky. I know the next question will be "can you post a clip here?". I will try t