Skip to Content

Sum of group distinct count

Hello,

I am new to the Crystal reports. I hope someone can help to solve a problem. I would really appreciate any help.

I need find sum of group distinct count

GH1

Apple

Banana

Apple

Discount=2

GH2

Pear

Pear

Discount=1

“Total count?????”

I also need to be able to have “Total count?????” calculationin crosstab distributed by month.

I hope it is clear.

Thanks a lot!!!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 08, 2017 at 08:32 PM

    Hi Abhilash,

    First of all I want to tell you that you are real Crystal EXPERT!. Your advice is always helpful.... thanks a lot.

    Formula works and I'm getting report total. Is there any way to use this formula in crosstab? I need this number distributed monthly.

    Thanks again.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 07, 2017 at 07:46 AM

    Hi Alisia,

    1. Create a formula with this code and place it on the Group Footer:

    shared numbervar disc;
    disc := disc + DistinctCount({Table.FruitField}, {Group field});
    '';

    2. Create another formula to display the final count and place this on the Report Footer:

    shared numbervar disc;

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Abhilash,

      First of all, I want to tell you that you are real Crystal EXPERT! Your advise always helps....Thanks a lot. This formula works. Is there any way to use this "total formula" in crosstab distributed by month. Thanks again!

  • Mar 09, 2017 at 07:49 AM

    It is possible, however you'd need some extra calculations in the crosstab to be able to achieve this.

    Please post that as a separate question with a sample mock-up of your crosstab.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded