7 Replies Latest reply on Jul 26, 2013 3:17 PM by Daniel VanderMeer

# Create Dimension from Aggregated Measure?

Is there any way to create a dimension based on a SUM of a measure?  Or do I need to summarize the measure in my data source?

I'm trying to create absence levels, similar to a bin, so that I can compare data across absence levels.  However, since I cannot create a dimension based on an aggregate measure, I am unable to do this currently.

Anyone have a work around?  Thanks in advance.

• ###### 1. Re: Create Dimension from Aggregated Measure?

Could you post a small sample set of data and your desired outcome? I don't fully understand what it is you are looking for.

Thanks!

Daniel.

• ###### 2. Re: Create Dimension from Aggregated Measure?

You can create discrete measures and use those to generate headers, and table calculations can partition on discrete measures (by turning off Ignore in Table Calculations), but like Daniel I'm not clear on your goal. Posting a packaged workbook or using Superstore Sales to model it would be useful.

Jonathan

1 of 1 people found this helpful
• ###### 3. Re: Create Dimension from Aggregated Measure?

I want to use an aggregate measure as a filter, or compare other measures without summarizing in the data source.

For example, I would like to compare levels of absences (let's say 1-10 absences, 11-20, etc) to number of discipline incidents.  Or perhaps filter on the sum of absences.

I can summarize the values in the data source so was only asking to see if there are any other options. Not critical at all, so no packaged workbook... Appreciate the tip, Jonathan.

.

• ###### 4. Re: Create Dimension from Aggregated Measure?

You can do something like the following:

IF  SUM(absences) > 20 THEN 'Terrible Attendance'

ELSEIF Sum(absences) > 10 THEN 'Poor Attendance'

ELSE 'Fair Attendance'

END

Which is similar to a bin and, which you could use as a filter and compare to discipline incidents...

Hope this helps!

Daniel.

• ###### 5. Re: Re: Create Dimension from Aggregated Measure?

Daniel, that calc can't be used as a filter because it's a discrete regular aggregate. This is a limitation of Tableau, it does not compute the domain of discrete aggregates for use in Quick Filters. There are a couple of workarounds:

- Convert the calc into returning continuous dates

- Use a table calculation (which Tableau can compute the domain for).

I set an example up using Superstore Sales in the attached.

Jonathan

• ###### 6. Re: Re: Create Dimension from Aggregated Measure?

Thanks again, Jonathan! And appreciate your responses Daniel, keep it up. These forums only get better with more participation.

• ###### 7. Re: Create Dimension from Aggregated Measure?

Thanks, Matthew and Jonathan. I've learned a lot from this one!