Dynamically add/remove columns in a pivot table?

Hi Quicksight community.

We are replacing our in-house reporting dashboard with Quicksight. One question regarding one pivot table.

Our table has values columns like | 10% | 20% | 30% | 50% | 90% |. A user can add and remove the column on the fly. The values of the column are calculated on the fly. Does Quicksight support it? Thanks!

Best regards,
Bill

Hi @billzhang3046

Yes. It is very much possible.

a. You could have your 10%, 20% list in a parameter (e.g. Param )
b. Create a calculated field say as “Measure” which
ifelse( {$Param} = “10%”, {Column 10%},
{$Param} = “20%”, {Column 20%},
{$Param} = “30%”, {Column 30%},
{$Param} = “50%”, {Column 50%},
{$Param} = “90%”, {Column 90%},
0)
3. In your pivot include the Measure column.

I have typed in the general syntax and given simulated column names. You may need to refine the same per your details. But this general approach should work.

Regards,
Giri

Thanks Giri! However how does the user add or remove the column after the dashboard is created? Such as removing 90%? Thanks again.

Best regards,
Bill

Hi @billzhang3046,
It’s not possible for a user to remove a field/column from a visual once it’s created. Giri’s suggestion is a nice work around to switch between the percentage value being used but that user function is not currently available.

Let us know if you have any additional questions, if we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi @billzhang3046,
Since we haven’t heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!