Conditional Formatting & Assigning Metric Format based on Parameters

I have a calculated field that involves the use of Parameters to return different values based on what I select. For example, if my parameter is Clicks, the metric calculated field returns the click value, else it returns Conversion rate. And my parameter basically has two options for Clicks or Conversion Rate.

I would like to know how I can customise the output of these values such that Clicks have a number format and Conversion Rate has a percentage format. Is it possible to link formatting rules to the parameters?

Would also like to be able to customise my conditional formatting rules based on parameters such that if my Clicks decrease, the colour will show as green. But if I swap to Conversion Rate and there is an increase, that will show as green as well.

Hi,

The calculated field can either be formatted as a numeric or percent. I don’t see a way to customize based on 2 different formats ( click or conversion rate) .

A work-around is to use free-form layout and conditional rules.

  1. Create a parameter ( values : clicks , conversion rate )
  2. Create 2 calculated fields ( 1 for clicks and 1 for conversion rate )
  3. Create 2 visuals ( 1 for clicks and 1 for conversion rate ) , apply conditional formatting.
  4. Overlay the visual for conversion rate on top of clicks.
  5. Hide visual by default for conversion rate. Show only when conversion rate is selected in the parameter.

Selection is sales

Selection is percent of total

Analysis : Conditional Rules

Hi, @sambhavbhandari. We hope that Koushik’s solution worked for you. I am marking his reply as, “Solution,” but let us know if this is not resolved.

Hey Kristin,

I’m currently having the same challenge but I’m working with 10+ metrics, so creating that many visuals is simply not scalable. Has there been any development in this area?

Thanks
Flo

1 Like