Crystal Reports 2008- How do I get the median of a summarized field? - crystal-reports

I need a way to work around Crystal's inability to summarize a summary.
Data Sample:
Shipment Number and Sum of $ Paid:
shipment #1 $1089.34; shipment#2 $985.22; and shipment #3 $1002.87
I have grouped my data by Shipment Number and summed the $ Paid for each shipment. Different deliveries were on each shipment so I had to sum the $ Paid to get the total amount paid on each shipment. Out of this list of sums, I need to find the median. I know this would be easy to do if I exported to excel, but I need to have it built into the Crystal Report.
I know writing a simple formula such as median(sum($paid)) does not work. The error message "this field cannot be summarized" confirms that Crystal does not have the ability to summarize a summary.
Please help! Any work-arounds are greatly appreciated.

You can achive this by using Running total.
Take running total for paid and another running total for count then use both in a formula to find the median.

Related

Crystal Report - This field can't be summarized

I have a formula ABC
sum({Table1.col1},{Table2.FieldName})
My report is grouped by Table2.FieldName.
Then then want to add the value of ABC to another column's value.
My formula :
sum({#ABC},{Table2.Col1})
Here, I am getting this error that #ABC cant be summarized.
Is their any workaround to add these fields.
Crystal can't total other totals.
If you explain the situation in more details, there may be another way to accumulate the desired total.
Alternatively, Ken Hamady maintains a list of 3rd-party Crystal Reports UFLs (User Function Libraries) here. At least one of them allows you to do totals of totals by providing functions that allow Crystal formulas to accumulate and retrieve total values in memory.

How to summarize an if/then/else formula in CR

I have a formula which calculates the commission earned by a salesperson. We store our invoices under each salesperson, so it's easy to separate them. I need a way to summarize this formula, and I can't use either a running total or a summary because each customer has a different commission rate per pound sold. Currently, the formula to calculate what rate the commission should be applied something like this:
if {cust.custnum} = "101010" then .0250*sum(#metal lbs, {invoice.invoicenum})
else if etc.
where {#metal lbs} is a formula that has to be used as an intermediary to get the weight of the metal on the invoice, and looks like this:
IF {INVOICELINEDETAIL.GLCode} = "METAL " THEN
{INVOICELINE.Wt}
ELSE
0
Sorry for the lengthy post, but I'm trying to give as many pertinent details as possible.
If you group by customer and then also group by invoice number then you could put your summary in the customer footer, would that work for you?
Another thought is I believe in running total you can set a formula for the evaluation so maybe you could use the nested if there and achieve what you need?

Crystal Report XI: calculate subtotal % of total

I have a report that calculates a summary field by group location which I am calling a sub total. There is another summary field by company in group company section. We allocate corporate overhead costs based on volume of revenue. I need to take the location total revenue and divide by the overall company revenue to get the % of volume. My problem is that I cannot get the company total into the location group row without effecting the numbers. I have tried to create a running total field to get the total. I have tried referring to the main report to get the company total and I have tried summarizing the location totals but I cannot summarize a summarized field. Any suggestions would be really helpful, thank you!
Company Locations---------- Total Revenue-------- % of Volume
California------------------------ 500,000----------------- 500,000/950,000 ?
New York ---------------------- 300,000
Ohio ---------------------------- 150,000
Company Total: -------------- 950,000
This looks like the same thing I am trying to do but I don't understand the answer yet..
http://www.experts-exchange.com/questions/27749404/Crystal-Reports-XI-fixed-value-for-denominator.html
your best option is creating a subreport on the report header to calculate only your total revenue and then using it on your main report through a shared variable.
if sum({totalRevenue},{location}) > 0 then
sum({totalRevenue},{location})
/
sum({totalRevenue})

Crystal Reports 2013 - Running Total with Weekly Data

I'm a beginner with Crystal Reports. I'm using Crystal Reports 2013, and I've made a report with a structure like:
<Person>
<date>
<sale amount>
<sale amount>
<sale amount>
So I'm grouping by Person, and then by date. (And sorting by time). Now, Crystal Reports decided to also group my data by the week. That's perfectly okay by me. But how do I calculate the weekly total sales?
More specifically, I don't know "why/how" the report is automatically grouping by week.
So here's what I've tried: I created a running total field for the sale field. But:
If I set it to group on the date field, it groups daily. (Fair enough, except it's inconvenient)
If I set it to group on the person field, it keeps a running total of all sales through that week.
Here's the thing though: I'd like the report to group the data into weeks by default, and keep a weekly total. But I'd also like to include the option to group the data into months, and have the running total know that it should be a monthly running total. So far, I've only seen a way to keep a daily running total.
So, I guess specific my question is what group is Crystal Reports grouping by when it automatically groups by week? If this is the wrong question, any other advice to achieving my goal would be helpful, though.
Thanks!
Its your running total that's probably doing it.
Have you tried using the sales amount field straight away and then insert Summation of the field on the group footers? YOu may not need to use running totals.

Crystal reports 2011 Math operations on running total fields

Been trying to do this for hours, so would very much appreciate an answer. Google apparently hasn't heard this question before; in fact, I could find very little information on this subject anywhere, including in the Crystal reports help functions.
I have three running total fields in a Crystal Reports 2011 report. I need to add two of them together and then divide that sum by a third running total field.
Here is what I have in the formula field I have created in order to do this:
(Sum(rtotal1))+(Sum(rtotal2))/(Sum(rtotal3))
The error I continue to get is: The ) is missing
Can anyone tell me the correct syntax for how to do this (aggravatingly simple) operation?
So I'm not sure what your running totals are (sum, count, etc.), but you shouldn't have to specify sum in your formula. I did a quick mock-up with 3 running total fields, each one a sum of a value. the resulting formula looks like this:
({#RTotal0} + {#RTotal1})/{#RTotal2}
I'm not sure if the brackets are needed, but since you want to add RTotal0 and RTotal1 first and then divide that result by RTotal2, I advise to put them in.