Possible combination

Greetings,

I created a filter form whereby users are prompted to enter date intervals, select value from drop down list and click a button to see the result (filtered records)
I have 8 date fields and 6 combo boxes with multiple options to select a single value from.
Drop down #1 ‘Status’: 5 options
Drop down #2 ‘Close Reason’: 4 options
Drop down #3 ‘Department’: 10 options
Drop down #4 ‘Employee’ :16 options
Drop down #5 ‘Type’: 2 options
Drop down #6 ‘Agency’:4 options

I’m trying to determine the number of combination/permutations report can be generated from above.

TIA,
OceanCityData Analyst Asked:
Who is Participating?
 
Dale FyeConnect With a Mentor Commented:
Not sure why that matters?

if a value is required in each combo = 5 * 4 * 10 * 16 * 2 * 4

if user doesn't have to select an item in each combo = 6 * 5 * 11 * 17 * 3 * 5

But neither of those includes the 8 date fields.

What are you really trying to do here, I seriously doubt it is just determine the total number of possible combinations/permutations of values in these 14 controls.
0
 
OceanCityData Analyst Author Commented:
Thank you,

It was just out of curiosity as the question came up approximate number of report that can be generated. The first part (if value is required) is clear.  How did you come up with the second part of the calculation?  And, if we include date fields, is it going to be * 8?

TIA
0
 
Dale FyeConnect With a Mentor Commented:
For the 2nd value, the assumption that No value selected in the combo is essentially a value that equates to "any value", so I added 1 to each of the explicit values represented in each combo.  You might also have the possibility that the field associated with any of those combo boxes IS NULL, which might be another value.

Regarding the dates, since each of those date values could represent any number of dates (lets just assume each date field could represent just 30 days), then the number of date combinations (disregarding your combos) would be 30^8.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Dale FyeConnect With a Mentor Commented:
to determine the number of legitimate combinations of the combo box values, you do a SELECT Statement that looks like:

SELECT DISTINCT [Field1], [Field2], [Field3], [Field4], [Field5], [Field6]
FROM yourTable

This would give you the actual number of valid combinations which would return at least one record.
0
 
OceanCityData Analyst Author Commented:
Thanks Dale, you explained it very well.  I'll share what I learned from you with the users.

Regards,
0
 
Dale FyeCommented:
OP thanked Dale Fye for the explanations.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.