cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports: Possible to calculate "Mode" or "Most Frequent" value of Summaries?

cwarner
Participant
0 Kudos

I have a report where Group 1 is "Insurance Company" and Group 2 is "Voucher".

The Voucher contains several "payment" records, so would need to be summed first to give me "Total of Voucher Payments".

I then need to find the most frequent value of "Total of Voucher Payments" per Insurance Company.

Example: Insurance Company A usually pays us $100 per voucher and Insurance Company B usually pays us $90 per voucher.

Crystal will not allow me to do a mode (@Voucher payment summary). I also tried using a variable, but I couldn't figure out a mathematical equivalent for the function "mode".

Any workarounds or suggestions?

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

cwarner
Participant
0 Kudos

That isn't giving me the correct result. If I use mode({payment}, {@Insurance Company}), it gives me "0" which is accurate in the sense that the most frequent payment line on a voucher is 0.

I tried putting this on every group header and footer in my report, still shows a 0.


However, I need the mode of the "Total" of the voucher records (payments).

So, my formula looks like this: mode ({@Voucher Total Payments}, {@Insurance Company})

When I try this in Crystal, I get an error: "This field cannot be summarized."



0 Kudos

Hi, may I ask how is the opposite way? Like show the NOT frequent value using mode or other function. Hope you help me.

DellSC
Active Contributor
0 Kudos

Which version of Crystal are you using? In Crystal 2016, there is a Mode function. So, you would create a function that looks like this:

mode({Voucher Amount Field}, {Insurance Company Group Field})

Then put the function on your report where you need to show the value.

-Dell