Dynamic calculation based on filter/parameter/control

I have a dataset created in Quicksight which has various columns such as GMS, NetPPM, CP etc. I would like to create a dummy filter that has these names (GMS, NetPPM, CP) and then created a calculated field where if returns the sum of the column corresponding to the filter name selected. Is there a way to do this?

Hi @saransss

you would need to create a parameter (e.g. “KPI”) and parameter control for your selection.
Then you can create a calculated field “KPI to show” where you use the parameter and corresponding field.

ifelse($KPI="GMS",sum({GMS}),$KPI="CP",sum({CP}),......)

BR

Thank you @ErikG rikG