5 Replies Latest reply on Jul 21, 2016 4:43 AM by khalid norat

    Using parameters within an (aggregation) calculated field


      I'm struggling with a Tableau puzzle. (Please see the attached workbook for a mock up).


      I created a parameter names Customer List, so that I'm able to use 'All Customers' as a filter option (and not just the 'All' option, which would display all filter options - common workaround I've seen).


      You'll see the calculation with the Margin (par) and Revenue (par) field, both with similar logic:




      I would like to create a calculated field that calculates Margin % per customers. Here is how I've defined it (using the attr() function to avoid the 'Cannot mix aggregate and non-aggregate arguments' error:


      However - the field doesn't appear to calculate anything, when I pull it into the table: