How to Create an action button with dropdown and displaying the required values

I am trying to create a dropdown which includes all the metrics and calculated metrics as shown below

so when i select any of the metrics in the dropdown the following data should be displayed in line chart
also need the option to select and display multiple values from the dropdown

First you would make a multi value param.

Then you would make this your calculated field.

ifelse(in({client_id},${coloredParam}) OR in(NULL,${coloredParam}),{client_id},NULL)

Where client id would be your different measure.

If they are different columns then you would have to list it out like this.

ifelse(in('CTR',${coloredParam}) OR in(NULL,${coloredParam}),{ctr_measure},
in('Frequency',${coloredParam}) OR in(NULL,${coloredParam}),{frequency},NULL)

I don’t know if that will work ^ but you can try.

1 Like

Hi @Max I am facing issue in displaying all the selected metrics in separate lines in a single line chart, when i click the new metrics the old metrics is getting replaced with the new one, but in dropdown its showing both are selected.

Anyhow thanks for the suggestion.

But, for single select dropdown i have used the below formula in calculated field

ifelse(${Measure}=‘Impressions’,sum(impressions),${Measure}=‘Clicks’,sum(clicks),${Measure}=‘Conversions’,sum(conversions),${Measure}=‘CPC’,(sum({spend_in_dollar})/sum(clicks)),${Measure}=‘CTR’,(sum(clicks)/sum(impressions)),${Measure}=‘CPA’,(sum({spend_in_dollar})/sum(conversions)),${Measure}=‘CPM’,(sum({spend_in_dollar})/sum(impressions))*1000,${Measure}=‘Frequency’,sum({total_impression_frequency}),max(reach))

the desired output is one metric at a time, which is fine.

But, for multi select i have used this formula:

ifelse(in(‘Clicks’,${coloredParam}) OR in(NULL,${coloredParam}),{clicks},
in(‘Impressions’,${coloredParam}) OR in(NULL,${coloredParam}),{impressions},
in(‘Conversions’,${coloredParam}) OR in(NULL,${coloredParam}),{conversions},
in(‘CPA’,${coloredParam}) OR in(NULL,${coloredParam}),{cpa},
in(‘CPC’,${coloredParam}) OR in(NULL,${coloredParam}),{cpc},
in(‘CPM’,${coloredParam}) OR in(NULL,${coloredParam}),{cpm},
in(‘CTR’,${coloredParam}) OR in(NULL,${coloredParam}),{ctr},
in(‘Frequency’,${coloredParam}) OR in(NULL,${coloredParam}),{total_impression_frequency},{reach})

but i’m getting only one output even after selecting multiple values

How to add the formula to get all these metrics separately in a line chart based on the multiple selection like the below image??

Note:Or is there any other way to display the selected multiple metrics separately in line chart by just linking a parameter to all the metrics added in that chart

I don’t think this is possible.

The other only thing I could think of was to make a separate visual for each possibility (that would be a lot) and use conditional rules to hide / show the separate visuals.