Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count of Current Selections

HI Guys,

I need a function that counts all selections of de current selection box;

Example

Year : 2016

DIM 1 : X

DIM 2: Y

DIM 3: Z

Count  = 4 selections

Any idea's?

Best regards,

Robbie

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Or, something like:

For number of fields:

SubStringCount( GetCurrentSelections(':', ',', '@', 100), ':')+1

For number of values:

=SubStringCount( GetCurrentSelections(',', ',','@', 100), ',')-SubStringCount( GetCurrentSelections(':', ',','@', 100), ':')


sillytricksdepartment


View solution in original post

7 Replies
Gysbert_Wassenaar

Try this

=rangesum($(=concat( 'GetSelectedCount([' & FieldValue('$Field', ValueLoop(1, $(=FieldValueCount('$Field')))) & '])',',')))

sillytricksdepartment‌


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

something like this?

Chart with count of $Field values

tresesco
MVP
MVP

Or, something like:

For number of fields:

SubStringCount( GetCurrentSelections(':', ',', '@', 100), ':')+1

For number of values:

=SubStringCount( GetCurrentSelections(',', ',','@', 100), ',')-SubStringCount( GetCurrentSelections(':', ',','@', 100), ':')


sillytricksdepartment


Anonymous
Not applicable
Author

Hi Gysbert,

Thanks for your reply but I think my question was not clear enough.

It's not the count of the values of the fields, Its the count of the selections: Year+DIM1+DIM2+DIM3 makes 4...

Gysbert_Wassenaar

That's a lot saner than my attempt. You may want to add the Maxvalues parameter though. The default is six. If you have more than six selections in a field the total count will be off.


talk is cheap, supply exceeds demand
tresesco
MVP
MVP

Absolutely! Important catch.

Anonymous
Not applicable
Author

Yes, that did the trick thanks