7 Replies Latest reply on Aug 11, 2015 6:02 AM by Charles Dinerstein

# sets and dynamic filtering

I have defined 3 sets and want to create a calculation to place in the filter card to dynamically change the set. I can easily enough create a parameter but when I try to create a calculation as either an If or Case statement I get a message that I cannot use a Boolean. Any suggestions or is there some way to use groups instead.

• ###### 1. Re: sets and dynamic filtering

It sounds like your calculated field is incomplete. What is the formula you are using now? When I create a dynamic set, my calculated field follows the following:

If (enter the requirement) then 1 else 0 end

And then I filter on 1. Mine always works.

• ###### 2. Re: sets and dynamic filtering

Thanks for the response, although I remain a bit lost. Here is what I have:

Parameter with 3 string choices

Calculated field that can convert string choice to 1 or 0

I am having a problem connecting that calculated field to a specific set

that I am using as a filter. When I write any if or case statement I get

that I cannot use the set because it is a boolean.

If parameter =1 THEN  end or

Case parameter WHEN 1 THEN  end

On Wed, Aug 5, 2015 at 5:56 PM Ailsa Zheng <

• ###### 3. Re: sets and dynamic filtering

Can you upload a sample workbook please? This would help a lot!

• ###### 4. Re: sets and dynamic filtering

Will try and get this to you in the next 24 hours. Thank you

On Thu, Aug 6, 2015 at 2:19 PM Ailsa Zheng <

• ###### 5. Re: sets and dynamic filtering

I have put together a rough workbook with the three sets a parameter and calculated field that I would like to use as the filter. Any of the measures can be used. Again thank you for the help.

Chuck

• ###### 6. Re: sets and dynamic filtering

Hi Charles,

I found a workaround for your problem:

I created 3 measures: CHF Match, COPD Match, and Sepsis Match.

CHF Match:

If [CHF] then 1 end

COPD Match:

If [COPD] then 1 end

Sepsis Match:

If [Sepsis] then 1 end

And then for the Set Filter:

Case [Set Parameter] WHEN "CHF" THEN [CHF Match]

WHEN "COPD" THEN [COPD Match]

WHEN "Sepsis" THEN [Sepsis Match]

END

I put the Set Filter in the filter. Please see attached. I put the revised version on worksheet #2.

• ###### 7. Re: sets and dynamic filtering

Alisa

Thank you so much for your help and persistence.

Chuck