1
votes

This must be a frequently asked question, but I can't find a simple version of it with an answer that makes sense to me.

In the view below, I'm simply listing the top N employees by overtime %. Since my data has one row per EMPID, each row in the view should represent only one row in the data, so, in my newbie dialect of Tableau jargon, this view's dimensionality or granularity is row-level.

enter image description here

So, it shouldn't matter what aggregation type I use: MIN, MAX, AVG, SUM should all give the same number. Nevertheless, it bothers me to use any aggregation for two reasons: 1) if I use anything other than SUM, it shows up (by default, I know I can change it by hand) in the column name; and 2) if I do use SUM and something messes up my assumption that every row in the table represents one row in the data, the number could be quite wrong without my noticing a problem.

Do I just need to suck it up and pick whichever type of aggregation bothers me least, or is there a right way for a fastidious data nerd to do this in Tableau? Oh, and I hope the answer isn't, "Convert them from measures into dimensions," because I tried that and then I seem to lose the ability to use normal number formatting.

I'll also ask, because the answer may somehow be related to my main question, what's up with the "Measure Names" pills in the filter and column areas and "Measure Values" under Marks? I don't recall putting those there and strange things happen when I try removing them.

1
BTW, the EMPID is made up. No actual human beings should be embarrassed by this screenshot.Sigfried

1 Answers

1
votes

Tableau by default always generates aggregate (SQL GROUP BY) queries - so that each mark on the viz represents potentially many data rows. However, you can tell Tableau to not generate aggregate queries by turning off "Aggregate Measures" from the Analysis menu.

In that case, you get a one-to-one mapping between data rows and marks (more accurately between data rows and query results). The whole idea of dimensions and measures then does not apply, and the SQL queries do not contain the GROUP BY clause.

Nothing wrong with doing this. It will get rid of the SUM() etc in your labels. Just realize that some of useful features in Tableau are only available with aggregate queries. Its sometimes useful to turn off aggregate queries, but I personally rarely do it - and instead control the granualarity of the viz by choosing dimensions to put into play.