Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Group Sorting Distinct Count Minimum

Group Sorting Distinct Count Minimum

Group Sorting Distinct Count Minimum

CR 2016
SQL Server
Trying to only display groups with more than one report number

I am reporting traffic accidents in a city based on the number of accidents by location
Most locations only have one report for my time period. I do not want locations with only one report to display
Each accident has a unique report number and a location field

The report is grouped by location, I'm using distinct count formula, and group is sorted in descending order.
My distinct count formula: distinctcount({Report_No},{Report_location})

In the Group Selection Formula Editor I am using this: distinctcount({Report_No})>1 however all of the groups are still displaying
I have used this Group selection formula in other reports, and it has worked.

I think I am missing something simple here. Any help is appreciated


RE: Group Sorting Distinct Count Minimum

Try amending your Group Selection formula to something like:


DistinctCount({Report_No},{Report_location}) > 1 

Hope this helps.

Cheers, Pete

RE: Group Sorting Distinct Count Minimum

Thanks this solved the problem. You helped me out with a similar one of these about a month ago and I thought that would work here. Both of these are being used in Sub reports. I appreciate the assistance.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close