Counting number of options in a multiselect custom field

Hey Everyone!

So I am having an issue creating a new measure which will count the number of items selected in a multiselect field.

This image show currently [Measures].[Creative - Brand Selection(s)]. This is a multiselect field with a number of options. For some other measures we would like to make we need to know how many options were selected. I have tried using Count, but as it is just a string being returned the count is 1. Any help on this would be appreciated

Hi @Matthew_Feldman,

Sometimes even in the string, you may find something to count. If you have a string with multiple values separated by commas, you can count the commas.

There is an example that counts how many values are selected in the label field. Given formula compares string length with commas and without commas and adds 1 for the first value in the string.

--counta commas only if field has any value
CASE WHEN NOT IsEmpty([Measures].[Issue labels]) THEN
Len([Measures].[Issue labels])
- Len(Replace([Measures].[Issue labels], ',', ''))
+ 1

Zane /