How to apply dynamic formatting to a calculated field with multiple KPIs controlled by Parameter control selection?

Hi Team,

I am using a calculated field to plot KPI based on user selection in parameter control.
For Example if a user selects “Total Calls” in Parameter control, calculated field format should be Numeric value but if any other user selects “Percent Silence”, then the format should be percentage, or if any user selects “Average Call Duration” then the format should “453 sec”.
Can you please help me find solution on this.

1 Like

Hi Mayank,

You can achieve this using a conditional rendering of a KPI visual. So create 3 visuals one for each control value and hide the visual by default. Then update the rule for each visual to render when respective control values are selected. In my example, I am rendering the visual when Control Segment value is “Enterprise”. See the attached example

Thanks a lot Deepak. Your solution works.
But I already have 30 visuals in my sheet and I will have to create 6 duplicate charts just for 1 visual. Is there any alternative way through which I can achieve this without creating multiple duplicate charts.

Thanks
Mayank

Hi Mayank,

You can explore insights visual to display as KPI since insight customization support multiple measures along with text formatting. see the sample attached, you can use the large fonts from paragraph drop down to make measure values appear as KPI and apply other formatting as applicable.

Let us know if this helps in meeting your requirements.

Hi,

i had a similar problem and reached the limit of visuals.

My workaround was creating a new column “format_id”, where I gave every used metric an id.

ifelse(parameter = metric 1, 1,
ifelse(parameter = metric 2, 1,
ifelse(parameter = metric 3, 2,
ifelse(parameter = metric 4, 3,
ifelse(parameter = metric 5, 1,
ifelse(parameter = metric 6, 3,
NULL))))))

/*

MetricColumn

1 = without unit

2 = €

3 = %

*/

In the table I then used conditional formatting:

The icons appear in front of the values, but i can live with that.

Hey Deepak,

I have an issue with this customization. You show the IF blocks that would allow conditional formatting to change the insights internally but this does not change the Time Value associated with the insight itself. So even if we program specific behavior it does not change the aggregate of the insight. Do you have a solution for this?

Does this conditional formatting work only incase of KPI’s and Table, i have heat map and stacked Bar chart. dont see an option to give different formats to the calculated Field- Field is expected to have %,$,number

Hi,
yes, the conditional formatting is only available in tables.

In your case, you could put the format in the name of the control values and in your heat map you only show the values as numbers.

Like this:
image

And in the title of your heatmap you can put in the parameter as a placeholder, so the people see what value they have in the heatmap.