Brian Dunning's FileMaker Custom Functions

unique_combinations_counter_rec ( number_values )

Same as "unique_combinations_counter (number_values)"; but recursive. This function calculates the number of unique combinations of n values (WARNING 212 Values Max)

  Average rating: 4.3 (35 votes) Log in to vote

Eric Plassot   Eric Plassot
INRAP
http://www.inrap.fr/archeologie-preventive/p-7-Accueil.htm

Share on Facebook Share on Twitter

  Sample input:
unique_combinations_counter_rec(4)
unique_combinations_counter_rec(50)
  Sample output:
15
1125899906842623

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Same as "unique_combinations_counter (number_values)"; but recursive.
This function calculates the number of unique combinations of n values (WARNING 212 Values Max)
ex :
list = "a¶b¶c¶d" ----> 4 values
combinations = "a¶b¶c¶d¶ab¶ac¶ad¶bc¶bd¶cd¶abc¶abd¶acd¶bcd¶abcd"
---> 15 unique values (without aa, abc=bca=cab=acb...)

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.