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.

Under construction. Email me your wish list for improvements.