Combining Statments In A Formula
I'm trying to combine all records with a closed date and rejection_withdrawal date in two different columns in a table. If I run each of the below statements separately, I get 520 for for closed date and 382 for rejection_withdrawal date, but when I combine statements (as shown below), the count from the last statement is returned. I've tried everything I know how. Can anyone help ?
How can I combine statements in a formula to return the total count from both statment ?
= {?Closed Date}
Or
= {?Closed Date}
Hello Lenell,
If I understand your situation correctly, you have 2 columns in a table. 1 column, Closing_Date, has 520 records, the other, Rejection_Withdrawl_Date, 328. You are trying to count the number of Rejection_Withdrawl_Date records but are receiving the 328 value instead of 520.
I am not sure how the 2 columns relate to each other but as there are less Rejection_Withdrawl_Dates some of the those records would have to be null. Crystal Reports will not count null records.
If I am understanding your situation correctly then I would suggest using a formula similar to the following;
if not ( isnull()) or not(isnull())
then 1 else 0
You can then summarize this formula to get a count of Closing_Date or Rejection_Withdrawl_Date value that are not null.
If I have misunderstood what you are trying to do please give a more detailed description of the issue.
Similar Messages

How do I selectively combine data in a formula?
I come from the world of programming and MySQL, so I hope I'm able to do this in Numbers. I have a table with the following columns (data type is in parentheses): Date (Date), Item(Text), Category(Text), Amount(Currency), Note(Text), Balance(Currency).
I want to do a number of different things to this table, but I'm finding it hard to do some of the simplest things. For example I want to get the total of all my spending [[Amount]] in a specific month [[Date]] for a particular Category [[Category]]. The farthest I got was:
=SUMIF(Home :: Tracker :: Category, "=Medical", Home :: Tracker :: Amount)
which means: give me the sum of all the amounts where the category is "Medical".
I'd like some general tips on how to construct these types of formulas as I would like to do some more complicated things than this.
Thanks!
AveryHi Avery,
Welcome to the discussions. Numbers 09 has the Function SUMIFS that does multiple comparisons, which of course is what you are looking for. In Numbers 08, I find it easiest just to add a column to the main table that concatenates the Category and Date, then test on that new column, using a criteria that is also a concatenation of category and date.
Jerry 
Member formula restriction problem
I have made a customized form in Capex the layout of the form is that on row side i have Line Item dimension with 5 members and their parent and on coloumn side i have account dimension with 7 members selected.
I am using a member formula on the parent of the line item member on row side and in that member formula i have restricted one of the 7 account dimension member on the column with the help of IF statement. My problem is that if i dont use that if statment the member formula works fine but it also works on the other 6 members of the account dimension (on column) and if i use the IF statment then the member fornmula does not work at all.
My requirement is that the member formula should work on the combination of that 1 member of account dimension and parent of line item on row side.
Can anybody help me with that?Hi Nilanjan,
1) all the members are in the same hierarchy (in fact, there is only one hierarchy)
2) all these members come from different branches of the hierarchy, they are not siblings, some are parents of others, however.
The values I specified are real values which I actually get when putting the accounts in an EVDRE report. Therefore, separately in EVDRE I see the calculated value 6 for account A and the fixed value 1 for account C. So, I expect to see also the value 1 for the account B and instead I see 2 meaning that for BPC 6 <= 1.
That is why I assume that BPC does not recalculate the account A used in the account B. And that is why I assume that solve_order is the problem. And I can not make this solve_order work in any way. What are the rules of SolveOrder's usage?
Thanks for help.
Valera 
FORMULA=USING/TOTAL IS NOT WORKING IN BPC NW.
Hi,
I am doing Migration project from BPC MS to BPC NW 7.5. In this I am not able test the Allocation formula.
FORMULA=USING/TOTAL.
Here in this Total is not working. The final result same as USING combinational value. The formula is working for USING combination like FORMULA=USING/100,USING*100....,
WHERE=WHAT* USING/TOTAL.Let me know is there any solution for this.Could you please update me on this.
Find the below sample code for the Allocation Logic.
LOGIC:
*RUNALLOCATION
*DIM P_ACCT WHAT=CE0004010; WHERE=CE0004020; USING=CE0004030; TOTAL=CE0004210
*DIM CATEGORY WHAT=PLAN; WHERE=PLAN; USING=PLAN; TOTAL=PLAN
*DIM P_CC WHAT=India; WHERE=India; USING=India; TOTAL=India
*DIM P_DATASRC WHAT=UPLOAD; WHERE=UPLOAD; USING=UPLOAD; TOTAL=UPLOAD
*DIM P_ACTIVITY WHAT=Repair; WHERE=Repair; USING=Repair; TOTAL=Repair
*DIM RPTCURRENCY WHAT=LC; WHERE=LC; USING=V; TOTAL=LC
*DIM TIME WHAT=2009.JAN; WHERE=2009.APR; USING=2009.MAR; TOTAL=2009.MAY
After exccuting this formula and by observing the Formula Log one record write back message displayed.
Thanks and Regards,
VC kRISHNA.Hi,
Please find the below Allocation logic. Here in this case also getting the same out put. The whare combinational value same as using. This Allocation Logic and the previous one is working with out fail in the MS version. Let me know is this may be a product issue. Could you please update me in this.
Logic:
*RUNALLOCATION
*FACTOR=USING/TOTAL
*DIM PROJECT WHAT=BAS(CorpBudg_Project); WHERE=[SCTSQ1]="Y"; USING=<<<; TOTAL=No_PPC
*DIM ENTITY WHAT=PC10102106; WHERE=NO_PCENTER; Using=<<<; TOTAL=NO_PCENTER
*DIM ACCOUNT WHAT=BAS(Corp_Budg_Accnts); WHERE=880014; USING=<<<; TOTAL=<<<
*DIM DATASRC WHAT=INPUT; WHERE=<<<;USING=<<<; TOTAL=<<<
*DIM RPTCURRENCY WHAT=LC; WHERE=<<<; USING=<<<; TOTAL=<<<
*DIM CLIENT_GROUP WHAT=1010; WHERE=<<<; USING=<<<; TOTAL=<<<
*DIM CATEGORY WHAT=BUDGET; WHERE=<<<; USING=<<<; TOTAL=<<<
*DIM INTCO WHAT=Non_InterCo; WHERE=<<<; USING=<<<; TOTAL=Alloc_PC10102106
*DIM TIME WHAT=BAS(2011.TOTAL); WHERE=<<<; USING=2011.BSS; TOTAL=<<<
*ENDALLOCATION
*COMMIT
Thanks and Regards,
Krishna. 
How do I assign a numerical value to text cells in cartesian products?
Hi, this is more of a two part question.
Question 1
I need to be able to assign numerical values (Table Value £ of set up) to text cells (Set Up).
1. The table "Combinations" then uses the formula
IF($A3≤Information::$B$8, MOD(INT((ROW(cell)−3)÷PRODUCT(C$1:$G$1)), B$1), "")
to take info from the "Information" table and create all possible permutations of "Set Up"
2."List" is the printed list of "Combinations"
3."Output of list" concatenates the data from "List".
Question 2
4. How do I print out the total numerical value of the concatenated string of "Output of List" into Output (£) of List"?>
When posting code or code snippets. HTML/XML or input/output, please use the code tags. The code tags help retain the indentation and formatting of the sample. To use the code tags, select the sample and click the CODE button.
Here is how the first code snippet would have appeared in code tags.
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
float num1, num2, num3, result;
num1 = Float.valueOf(jRadioButton1.getMnemonic());
num2 = Float.valueOf(jRadioButton2.getMnemonic());
num3 = Float.valueOf(jRadioButton3.getMnemonic());
result = num1+num2+num3;
jTextField1.setText(String.valueOf(result));And while I'm on the subject of retaining the indentation of the original sample, please use one of the two common conventions for indenting code blocks. E.G.
Convention 1:
class TheClass {
TheClass() {
}Convention 2:
class TheClass
TheClass()
} 
I grouped a report and selected top 10 and other. Instead of showing the word other for the other category (despite choosing the radio button to do so) it shows the last value in the group. I think its' because I am grouping on a calculated field:
IF (IsNull({Command.AcctPriKey}) or length(ToText({Command.AcctPriKey}))<1)
then {Command.custname}
else {NAcct_.Nacct}
also
When I group on this, it doesn't actually group on this value, it groups on the combined fields in this formula. So the result of this field could be Kobe because NAcct_.Nacct = Kobe or because Command.custname = Kobe. Crystal WILL differentiate and will put them in different groups. How do I prevent that?
also
iif(IsNull({Command.AcctPriKey}) or length(ToText({Command.AcctPriKey}))<1), {Command.custname}, {NAcct_.Nacct})
Doesn't work. I don' t know why.
Finally isn't there something like coalesce in crystal. It's such a handy function, they should really consider supporting it so we don't have any of these issues.Hi,
For your first question, Other should show up if you have more than 10 groups generated. Looking at the Group Tree, how many groups show up?
What happens if you did a Top5 instead of 10? Does Other show in the Group Tree?
For your second question, Crystal will group on unique values regardless if the group is on a field or formula. I have a sneaking suspicion there is either a leading or trailing space in the name. Use the Trim function to remove the white spaces like:
IF (IsNull({Command.AcctPriKey}) or length(ToText({Command.AcctPriKey}))<1)
then Trim ({Command.custname})
else Trim ({NAcct_.Nacct});
For your third question, throw the iif format out. That was introduced because of dBase years ago and most people I know hate using it. Go with the traditional. Easier to read and figure out.
Good luck,
Brian 
Hi this one has had me stumped for a while so I hope there's the expertise out there!
I have two tables in different sheets; Lesson Sheet::Lesson Log Table and Pupil Summary Sheet::Pupil Progress Table.
I need to populate the summary sheet using the data from the Lesson Log Table, as per the image.
When a user selects a pupil, the Pupil Progress Table should update for the selected Pupil.
The formulas I need are for the cells circled blue and red. Any ideas?Often when you end up with complicated formulas, index columns, and intermediate calculation tables, that's a sign maybe there's an easier way to do things (perhaps just filter the original data table, and live with the fact that the format is not as nice?). But here is one way that seems to do what you describe:
The index columns, which are later used by the INDEX MATCH lookup combination, are concatenation:
The formula in F2, copied down and right: =IF(LEN(C2)>0,C$1&$A2&C2&$B2,"")
The Calculations table:
C2, copied right: =IFERROR(INDEX(Lesson Log Table::$B,MATCH($A2&$A$1&C$1,Lesson Log Table::$F,)),")
C3, copied right: =IFERROR(INDEX(Lesson Log Table::$B,MATCH($A3&$A$1&C$1,Lesson Log Table::$G,)),")
C4, copied right: =IF(AND(Calculations::C4>Calculations::B4,Calculations::C4≠"Lesson Date"),Calculations::C4,"")
The Summary table:
C2 copied right and down: =IF(AND(Calculations::C2>Calculations::B2,Calculations::C2≠"Lesson Date"),Calculations::C2,"")
SG 
Hopefully someone can help with the IF AND functions in Numbers for iPad. The formula(s) that I am using works fine in both Excel and in Numbers, but I am not able to make them work as a combine entity in Numbers for iPad and wonder if someone have a solution.
I have following formulas which individually work fine in iPad
=IF(B4>=90%,"A")
=IF(AND(B4>=80%,B4<90%),"B")
If I combine them to following formula
Numbers for iPad =IF(B4>=90%,"A"),IF(AND(B4>=80%,B4<90%),'B")
Excel for Mac =IF(B4>=90%,"A",IF(AND(B4>=80%,B4<90%),'B"))
Note the difference  the bracket is erased after "A" and moved to after "B". The problem I am facing is that I can't seem to move that particular bracket in Numbers for iPad as it will erase the first part of the formula. Is there a way to get around the issue or is there an error in the Numbers for iPad? I would appreciate if there is a person out there that can help solving the issue.
Many thanks.Allcos wrote:
I am trying to have a cell copy the information from another cell, but only if there is any information in a third cell. Does that makes sense?
I want cell A2 to show the exact same value from cell A1 but only if cell A3 has any value in it. Otherwise, I want cell A2 to be blank. These cells are all text values.
Thanks in advance for any help.
Allcos,
In cell A2 write:
=IF(LEN(A3) > 0, A1, "")
Regards,
Jerry 
How do I make a cell equal a certain degree of a 360° zodiac point?
I need to make a cell equal a certain degree on a 360° zodiac point when typing a number from 0359. For example, if I would put in the number "10" in a cell it would give me "10 Aries" as a result in the cell. Doing 360 "if, then" statements is not desirable, and I don't think it is possible in Numbers. Usually spreadsheet programs have a limit on the number of "if, then" statements that can be "nested" in a cell. One friend recommended "concatenating," but this sort of makes my head spin at the moment. Any help would be appreciated. Below are some "if, then" statements that I put into Microsoft Excel before it said I could not put in anymore.
=IF(OR(D1=0),"0 Aries",IF(OR(D1=1),"1 Aries",IF(OR(D1=2),"2 Aries",IF(OR(D1=3),"3 Aries",IF(OR(D1=4),"4 Aries",IF(OR(D1=5),"5 Aries",IF(OR(D1=6),"6 Aries",IF(OR(D1=7),"7 Aries",IF(OR(D1=8),"8 Aries",IF(OR(D1=9),"9 Aries",IF(OR(D1=10),"10 Aries",IF(OR(D1=11),"11 Aries",IF(OR(D1=12),"12 Aries",IF(OR(D1=13),"13 Aries",IF(OR(D1=14),"14 Aries",IF(OR(D1=15),"15 Aries",IF(OR(D1=16),"16 Aries",IF(OR(D1=17),"17 Aries",IF(OR(D1=18),"18 Aries",IF(OR(D1=19),"19 Aries",IF(OR(D1=20),"20 Aries",IF(OR(D1=21),"21 Aries",IF(OR(D1=22),"22 Aries",IF(OR(D1=23),"23 Aries",IF(OR(D1=24),"24 Aries",IF(OR(D1=25),"25 Aries",IF(OR(D1=26),"26 Aries",IF(OR(D1=27),"27 Aries",IF(OR(D1=28),"28 Aries",IF(OR(D1=29),"29 Aries",IF(OR(D1=29),"29 Aries",IF(OR(D1=30),"0 Taurus",IF(OR(D1=31),"1 Taurus",IF(OR(D1=32),"2 Taurus",IF(OR(D1=33),"3 Taurus",IF(OR(D1=34),"4 Taurus",IF(OR(D1=35),"5 Taurus",IF(OR(D1=36),"6 Taurus",IF(OR(D1=37),"7 Taurus",IF(OR(D1=38),"8 Taurus",IF(OR(D1=39),"9 Taurus",IF(OR(D1=40),"10 Taurus",IF(OR(D1=41),"11 Taurus",IF(OR(D1=42),"12 Taurus",IF(OR(D1=43),"13 Taurus",IF(OR(D1=44),"14 Taurus",IF(OR(D1=45),"15 Taurus",IF(OR(D1=46),"16 Taurus",IF(OR(D1=47),"17 Taurus",IF(OR(D1=48),"18 Taurus",IF(OR(D1=49),"19 Taurus",IF(OR(D1=50),"20 Taurus",IF(OR(D1=51),"21 Taurus",IF(OR(D1=52),"22 Taurus",IF(OR(D1=53),"23 Taurus",IF(OR(D1=54),"24 Taurus",IF(OR(D1=55),"25 Taurus",IF(OR(D1=56),"26 Taurus",IF(OR(D1=57),"27 Taurus",IF(OR(D1=58),"28 Taurus",IF(OR(D1=59),"29 Taurus",IF(OR(D1=60),"0 Gemini",IF(OR(D1=61),"1 Gemini",IF(OR(D1=62),"2 Gemini"))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))Hi Mike,
The first thing I noticed in your formula was the multiple OR() statements with a single argument.
=IF(OR(D1=0),"0 Aries"
OR(condition1,condition2,...) returns TRUE if any of the arguments is TRUE. With only one condition, it returns TRUE if D1=0 and FALSE if D1 contains any value except 0. The bare boolean statement D1=1 returns the same results with the same conditions.
Although it's not too difficult to improve the efficiency of the formula, I would drop IF and use a little bit of math and the CHOOSE function (plus some concatenation) for what you want:
From your formula, I gather each of the houses occupies a 30° sector, starting at 0, 30, 60, 90, etc. with "0 housename" at each of those values.
To simplify the formulas I've done the calculations in three steps:
A value in the range 0 to 359 is entered in D2.
E2 is an intermediate cell that calculates the Quotient of that value divided by 30, then adds 1 to the result.
=QUOTIENT(D2,30)+1
This gives an index number that tells which house (1=Aries, 2=Taurus, 3=Gemini, etc.) that Zodiac point lies in.
F2 is a second intermediate cell that calculates the remainder of the value in D2 divided by 30, the number appended before the name of the house.
=MOD(D2,30)
G2 choses the name by its position in a list of choices, basing the choice on the index number calculated in E2, then concatenates the number calculated in F2, a single space, and the name returned by CHOOSE into a single text string and returns that string to the cell.
=F2&" "&CHOOSE(QUOTIENT(D2,30)+1,"Aries","Taurus","Gemini","3","4","5","6","7","8","9 ","10","11","12")
To save space,here (and to avoid having to look up the rest of the Zodiac signs and their order ), I've used numbers in place of the rest of the names.
The separate parts may be combined into a single formula:
=MOD(D2,30)&" "&CHOOSE(E2,"Aries","Taurus","Gemini","3","4","5","6","7","8","9","10","11","")
For details (and further examples) see the descriptions of each of these functions in the iWork Formulas and Functions User Guide. The guide, and the equally useful Numbers '09 User Guide, may be downloaded using the Application menu (in Numbers, the "Numbers" menu) items with those names.
Regards,
Barry 
Allocation Function in Integrated Planning
Dear all,
When reading the documentation on Integrated Planning ("New BI Capabilities..") I noticed the Allocate function is not mentioned.
These functions are mentioned:
Revaluation
Reposting
Formulas
Currency translation
Unit conversion
Copy
Distribute with reference data
Distribute by keys
Delete
Is the Allocation function not available in Integrated Planning. Or is it now called "distribute by keys"? Would be confusing...
Kind regards,
Hans de KleinDear all,
the allocation function is part of the SEM installation and since SAP BW3.5 not part of planning itself. When installing the SEM, the allocation function is available in BPS but not in BI Integrated Planning.
From my perspective there two typical situations for allocation of e.g. costs from costcenter/costelement:
1. The sender Costcenter/costelement is credited:
In this case the standard distribution function (within one characteristic) would do the same.
2. An other costcenter/costelement is credited:
Here you would require a combination of a fox formula (to copy the sender to the 'other' combination and to reverse the sign) and as a second step the standard distribution function (within one characteristic, with the option of not crediting the sender).
Best Regards, Olaf Fischer 
Hello,
Why does this SQL not work in a PL/SQL function in my report?
rank() over (ORDER BY column_name DESC) AS column_name
I am wanting a report that looks something like this...
Name 01/2002 Rank 02/2002 Rank 03/2002 Rank Total
Sales Sales Sales Rank
Jack $2.00 4 $18.00 1 $4.00 4 9
Tim $10.00 2 $4.00 3 $7.00 3 8
Chris $16.00 1 $3.00 4 $9.00 2 7
Bob $5.00 3 $8.00 2 $10.00 1 6
The second part of the report needs to look like this:
Name Jan02 Rank Name Feb02 Rank Name Mar02 Rank
Sales Sales Sales
Chris $16.00 1 Jack $18.00 1 Bob $10.00 1
Tim $10.00 2 Bob $8.00 2 Chris $9.00 2
Bob $5.00 3 Tim $4.00 3 Tim $7.00 3
Jack $2.00 4 Chris $3.00 4 Jack $4.00 4
Is there anyway I can do this in PL/SQL? It won't even compile with the rank() over...
Thanks in advanceHi Laura,
Ranking functions are not currently supported in client side PL/SQL. However, you can use RANK operatives in the queries in the data model in the report. That combined with group level formulas should give you what you need for the data.
regards,
Stewart 
Hi Team,
I have a wierd issue. I have reports with multiple groups. In all the reports, one of the groups is a formula for dynamic sorting based on the user input.
So far, everything works fine. Now, the issue is as below.
1. I've ran the report from Crystal Reports 2008 against DataSource1
2. I publish this report to BO server and configure Database credentials to point to DataSource2
3. When the report in scheduled from Infoview, the report fails with the error Invalid Group condition
4. If I remove the group for dynamic sorting, the report runs fine even when I switch from DataSource to other
5. One more observation is if I remove all other groups and have only the group for dynamic sorting, even then the report runs fine
The report fails only with the combination of dynamic sorting formula combined with groups in DB fields.
Please do give your valuable thoughts to get this fixed.
Thanks
NareshHi,
What version of Crysal 2008 are you running and what version of BO Server are you running?
I ran into a similar problem where it runs fine in the designer but from InfoView it fails.
I found out the problem was fixed in Crystal 2008 but the same fix has not been done in BO Server. To get around the problem, I installed Crystal 2008 with the same service pack onto the same machine as BO Server and that fixed the problem.
Good luck,
Brian 
Displaying a mix of L to R and R to L readable strings in a single text box
Folks,
Is it possible to get accurate display of fields when English string values and hebrew characters are dragged into a single text box for viewing.
Currently while doing this the display gets erratic as some of the english strings gets displayed in the middle of a hebrew word.
the whole text box data needs to be read as R to L , with the exceptions of a few English string DB values.
Is this achievable ? Thanks for your help.
JayakrishnanThanks for your reply Jamie.
I am not sure whether I made my requirement really clear.
I have these formula which display words in multiple languages, say english , hebrew , korean etc. The data value for this formula will be supplied by the framework externally at run time depending on which language has been selected.
Now for this scenario I got to display 50 + objects in a concatenated fashion containing the combination of above said formula ( Labels ) and their DB values.
For hebrew language the text growth should be R to L even if it would containg DB fields which may be integers or strings.
The logic you have mentioned in the txt file, I have not understood why we need to reverse the string as I am assuming the characters would be laid out correctly.
The missing part is when the string grows to the next line the printing should start from the Right and not from the Left.
Hope this would be a little more clear. Appreciate your time.
Jayakrishnan 
Hello Gurus
Is it possible to have a dynamic query and then be able to use bex formulas to do calculation in the dynamic rows.
thanksMark,
you won't be able to do the calculation in the Analyzer grid itself, but you will be able to do it outside of the grid:
For example, I have two queries and they pull the details from two separate multiproviders. I have the first query populate the analyzer grid and then using the formulas, I pull the data from the 2nd one. I basically start counting rows from the first data row in the analyzer grid until the end, and use the For/Next combination to put the formulas in
Sub ApplyFormulas()
ActiveSheet.ResetAllPageBreaks
Application.ScreenUpdating = False
X = Range("A7").End(xlDown).Row 'this line will find what the last line in the analyzer grid is
For I = 7 To X
Cells(I, 5).FormulaR1C1 = "=BExGetData("DP","Per",RC1)"
Next I
End Sub
Would this work for you? 
SRW.MESSAGE(msg_number NUMBER, msg_text CHAR);
Hi ,
how to display the value of the variable in a report using the above function..?
Regards,
Abdetu..Hello dsegard
Thanks for ur reply:
SRW.MESSAGE ( 100 , 'Variable P_TEST value = '  :P_TEST);.i want to return a variable value from a select statment in a formula not from a parameter or main query select..
Regards,
Abdetu..
Maybe you are looking for

How To Delete The Extra Page In Smartform Output
Hi Friends, I am working wih Smarform..which displays P.O Details (Header and Item ) . Header Details in Template and Item Details in Table.. I am trying to print 10 P.O ..for every P.O i kept New page command. So..finally i have to get 10 pages in o

How to use CSV format in making a data connection.
Hello All, I have got a form to develop. There are over 1000 entries to be imported. Can I use CSV format to embed those data in the forms. Mainly those data would be embedded as dropdowns.If I can use how to do it ? If i can not use is there any bet

Ever since I tried to back up my iTunes onto CD's, my iPod Nano periodically says it's in "Disk Mode" where I can't turn it on or off, get access to my playlists or any other settings. So far the only way I can get out of this is by letting the batte

How do you set the time for this forum??? Not in nerd pleas
how do you set the time for this forum?

The EWS URL wasn't found in the EXPR settings of the Autodiscover XML response.
Hi Guys, I have posted this on Spiceworks Fourm as well as I have run into some urgency on this issue. I know its not fair to post twice but I really need help on this one. I am busy troubleshooting an issue for one of my customers and was wondering