Change a field name based on Aggregate Threshold

Hi , I want to change the field name in pivot table if the sum of the field is under a Threshold. Example for all projects under 5MM the project name gets replaced to Projects <5MM. Tried the ifelse function for the field to replace but in the output certain projects higher than threshold are also getting the name replaced.

Hi @gulatiku

Welcome to the QuickSight community!

Use Level-Aware Calculated Fields to apply logic after aggregation.

ifelse is applied row-wise before aggregation, so even if a project has some rows < 5MM, it gets renamed even when the total sum > 5MM.

Example: Note - Replace the fields from your dataset

ifelse(
    sumOver({your_field}, [{project_name}], PRE_AGG) < 5000000,
    'Projects <5MM',
    {project_name}
)
1 Like