0 votes
1 view
in BI by (16.7k points)

I am currently writing a formula in a filter MyFilter's condition (shown below). I am trying to make it so that it will use the MyParameter's value as a filter if MyParameter's value is not All. In the case that it is All, then I would like it to not filter anything. I.e., Display all values. Here is what I have so far, which is incorrect. How might I be able to achieve the desired outcome? Thank you in advance for any help that you may offer.

IIF([MyParameter] != "All", // TEST CONDITION

[MyFilter] = [MyParameter], // THEN BLOCK

[MyFilter] = "ALL") // ELSE BLOCK

1 Answer

0 votes
by (44.9k points)

As you don't want the filter to filter anything in the case where your parameter is set to 'All'.

  • There are 3 pieces to this:

  1. [MyParameter]- Your parameter that includes values and 'All'

  2. [FilterField] - The field you want to use to filter against the parameter value

  3. [FilterCalc] - A calculated field to use in the filter card

  • The [FilterCalc] would have this logic:

[MyParameter] = 'All' OR [MyParameter] = [FilterField]

  • And just make sure you set [FilterCalc] 'True' once in the filter card.

  • Note that this is almost no different than putting the [FilterField] directly in the filter card. The only difference is that you explicitly restrict the values in your parameter ([MyParameter]).

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...