limiting result in crystal report formula field with a where

Is there any way to limit a formula field with a select statement?  I want to be able to create multiple summed values but each one for a diferent value in a column of the dataset.

Filter   #Elements
A            5
A            7
B            2
A            7
B            10
B            10

I want to be able to create one formula SumA and another one that is SumB.  I can easily see how to sum all the #Elements but not how to filter the formula.  Any ideas how to do that?

Thanks!
jrepdevAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jrepdevConnect With a Mentor Author Commented:
Bottom line is I can't do what I want to do so I have completely altered my approach.  Thanks team for all your help!
0
 
kingjelyCommented:
Please Show the results you expect to see.
0
 
kingjelyCommented:
do you mean

filter  #element
6        41
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
mlmccCommented:
Try this
Name - A_Values
If {FilterField} = 'A' then
   {#Elements}
else
    0

Name - B_Values
If {FilterField} = 'B' then
   {#Elements}
else
    0

You can then summ the formulas and show the values.

mlmcc
0
 
jrepdevAuthor Commented:
mlmcc,

I have done this but it seems that is a fixed number.  It does not filter for selections by groups in the report.  Is there anyway to do this and have the results relate to the group section it appears in?

Eva
0
 
mlmccCommented:
Put the formula in the detail section
Right click it
Click INSERT --> SUMMARY
Set it as a SUM
Insert it into all group footers

mlmcc
0
 
mlmccCommented:
Can you show given the data what you want displayed?

mlmcc
0
 
jrepdevAuthor Commented:
I discovered I could not do what I want to do.
0
All Courses

From novice to tech pro — start learning today.