Skip to content

Team DataFam TUG

Taming the ‘Cannot Mix Aggregate and Non-Aggregate’ Beast

47 min 6,404 words transcribed

Summary

Team DataFam Tableau User Group meeting 47 features Agata Mężyńska, Tableau consultant, Poland Tableau User Group co-lead and Tableau Ambassador, with an extended version of a Tableau Conference 2025 session on the error almost every Tableau user has met: "Cannot mix aggregate and non-aggregate arguments".

Agata starts with the basics: a table is rows of data, measures and dimensions, row-level calculations that can be worked out within a single row (good for adding, subtracting and multiplying, and the home of LOD expressions), and aggregate calculations that summarise many rows for the view (needed for division and for every table calculation, even INDEX). Dimensions set the level of detail of a view, measures are aggregated by default, and once one part of a calculation is aggregated, everything else has to be too.

In Superstore, Agata then wakes the beast and tames it five ways: moving the aggregation outside the brackets of an IF, aggregating every field when a parameter swaps in a pre-aggregated profit ratio, wrapping a dimension in MIN or MAX (faster than ATTR) to colour bars, a filter-aware label that compares MIN and MAX to tell one subcategory from All, and a FIXED LOD shorthand to colour the latest quarter. To choose between them, Agata offers three questions: do I really need row level, can the aggregation go outside the brackets, and do I need to keep my filters in mind?

Two extras cover cases where Tableau gives no error at all: subtracting a row-level field from an LOD, which silently inflates the total until both sides are aggregated, and a map of Warsaw's districts whose areas were summed across duplicate rows until wrapped in COLLECT. Every calculation is shared on Agata's Tableau Public profile.

The meeting closes with host Chris McClellan's Fast Five questions on simple charts, tiled versus floating layouts, filter placement, layouts or charts first, and the absence of colour, followed by notes on the next meeting, the Iron Viz deadline and the Tableau Hackathon closing on 12 January 2026.

Listen to this TUG

Prefer to listen? This meeting is also an episode of the Tableau TUG recordings podcast.

Key points

  • Row-level calculations work within one row; aggregate calculations summarise many rows, and the error appears when one calculation mixes the two.
  • LOD expressions are treated as row level, and table calculations, even INDEX, are treated as aggregates.
  • Reading a calculation aloud is a quick test: if it sounds logical with the aggregation outside the brackets, it will usually work.
  • When a parameter swaps in a pre-aggregated measure such as profit ratio, aggregate every other option too, which also helps performance.
  • MIN or MAX of a dimension is a fast way to aggregate it; ATTR works but is the slowest of the three.
  • MIN alone can mislead when filters allow several values, so compare MIN and MAX to detect when only one value is in view.
  • Some aggregation mistakes raise no error at all, such as subtracting a row-level field from an LOD, or summing geometry areas across duplicate rows instead of using COLLECT.
  • Three questions pick the method: do I really need row level, can the aggregation go outside the brackets, and do I need to keep my filters in mind?

Jump to a chapter (17)

  1. 0:00 Welcome to Team DataFam TUG 47
  2. 1:11 Agata Mężyńska introduces the session and the Tableau witch
  3. 3:36 What the session covers
  4. 5:19 The basics: rows, measures, dimensions and row-level logic
  5. 8:32 Aggregate logic and level of detail of the view
  6. 12:11 Method 1: move the aggregation outside the brackets
  7. 15:14 Method 2: aggregate everything when a parameter swaps measures
  8. 18:00 Method 3: aggregate a dimension with MIN or MAX
  9. 21:23 Method 4: a filter-aware label using MIN equals MAX
  10. 27:01 Method 5: an LOD to colour the last quarter
  11. 29:34 Three questions to choose the right method
  12. 31:37 Extras: when Tableau shows no error at all
  13. 32:06 Subtracting a row-level field from an LOD
  14. 35:47 Warsaw districts and COLLECT for geometry
  15. 39:08 Reactions and questions
  16. 41:14 Fast Five questions
  17. 43:32 Next meeting, Iron Viz deadline and the Tableau Hackathon

Transcript

0:01 Chris McClellan: Welcome to Team DataFam Tableau User Group meeting number 47. This TUG works a little bit differently to, differently to others because we cater more for the presenter rather than the audience. It's really good to have both, but we meet at all different times so we can get the best presenters from around the world, record the meetings, put them on YouTube.

0:21 You can come back and look at those recordings at any time in the future.

0:25 But obviously, it's good to have a live audience so we can have some Q&A at the end as well.

0:29 Uh, I'd forgotten that this is, tonight is actually, or today, depending on where you are, it's a repeat from TC'25. I don't mind if you've presented at TC or at another TUG or just you've just come up with a brand-new presentation and you don't… presented it before or don't know how to present.

0:48 We can find a slot for you. Get in touch. My email is team.DataFam@Gmail.com, and we'll find a slot for you.

0:56 Uh, but today we have Agata presenting on taming the beast that everyone has seen before: cannot mix aggregate and non-aggregate measures.

1:06 And I'll hand it over to you, and you can take it from here.

1:11 Agata Mężyńska: Thank you, Chris.

1:13 So as Chris just said, that's the, uh, repeated presentation from Tableau Conference, this year's Tableau Conference, but there are some extras. So we'll see… You'll see a little bit more than the people be- before you.

1:29 Uh, that's, that's just to say that thank you for being here with me, and I will try to reward you.

1:37 Uh, as it was said, my subject is taming the cannot mix aggregate and non-aggregate beast, and somehow I'm perfectly sure that has- everybody has come across the error at least once or twice.

1:52 Uh, well, before I get to that, let me say a few words about myself.

1:58 Uh, so my name is Agata Mężyńska, and I'm perfectly aware that my surname is a tongue breaker.

2:05 So just Agata. There are just two of us in DataFam, so you'll find me anyway.

2:11 Uh, I'm… I work as Tableau consultant by, uh, in New Data Labs. Uh, I'm also Poland Tableau User Group co-lead. Uh, this year I'm also privileged to be Tableau ambassador. And besides that, some people call me Tableau… Well, it's in Polish, Wróżka Tableau. Wróżka Tableau, if you translate it directly into English, is a Tableau fairy. I'm a big person, so I can hardly imagine how big wings would I need to be a fairy, uh, so I tend to say I'm a witch, Tableau witch.

2:45 I'm a Tableau witch. And, uh, apart from that, well, I'm always asked in such presentations to put logo next to my, uh, next to my photo, and I have absolutely no idea which logo should that be, so I put mine.

3:01 And if you can tell the three differences between the two pictures, you're already the winner today.

3:08 Great.

3:09 So now let's move almost to the subject because, uh, for a good reason, on Tableau Conference, there is always a bunch of thank you slides. So thanks, uh, first slide, uh, thank you for being here.

3:24 Uh, thank you, Chris, for allowing me the presentation, and the most important, Chris, thank you a lot for extra 10 minutes. That's a treasure. Thank you.

3:34 Uh, I will use it well.

3:36 So what I will be talking about. Well, first, we will cover the basics. Uh, I will talk about row-level data, aggregate data, row-level logic, aggregate logic, and difference between row-level and aggregate calculations. And then we, when we cover the basics, uh, we will be able to see what will happen when the beast wakes up. So try to simulate a few calculations that would, uh, result with the error, "You cannot mix aggregate and non-aggregate values." Okay, and I will share with you my five methods for taming the beast.

4:17 And usually, when you show five different ways to do something, in the end, people feel like, "My goodness, how am I gonna remember that? That's a lot." So I will share with you also my method to find easily, just with three questions, three simple questions, uh, the way to choose the best method. And if you already get, uh, try to get a pen and a piece of paper to make your notes, I appreciate that, but you do…

4:49 you don't feel forced to. Uh, in the end, I will share a QR code with access to everything you'll see here in my Tableau profile.

5:00 Uh, each single calculation will be there with comment, explanation, everything. Also, the diagram showing, uh, choosing the right method. Everything will be there, so don't worry about, uh, that. Okay, let's come to the topic.

5:19 In the beginning, there was a table. Some claim that in the beginning there was a word.

5:25 I've never seen that, and I've seen many tables that have been in the beginning, so let's agree that in the beginning there was a table.

5:34 And each table consists of rows of data. Rows, records, whatever, records, whatever you call them.

5:42 Each of them stands for a unit of data. One row is one unit of data. It can be employee, it can be, uh, invoice, it can be product, whatever you've got in your table.

5:54 And then these elements is characterized by da- by data that are put in columns.

6:02 And what you can have in columns, some qualitative data and some measurable data.

6:07 Okay, so usually in Tableau, the measurable data is defined by green pills, and usually that means measures.

6:18 Okay? And the qualitative data, they think that, I don't know, that's a name, that's, uh, maybe category, country, et cetera, or maybe someone is in eighth grade.

6:31 Uh, even though it's a number, yeah, it's still qualitative.

6:36 Uh, these are represented by blue pills, and usually these are dimensions. And some people say now, "Stop, stop, stop. Green pills are continuous data, and blue pills are discrete data. Don't you need to use it like that?" Well, that's true.

6:55 That's perfectly true. But for us today, it's enough to take a com- to take it from, to take it that, uh, green pills are measures and blue pills are dimensions, and we are good with that. That's enough. That's enough to understand everything, uh, even if it's slightly simplified. Okay.

7:17 So what then means row-level thinking, row-level logic, or row-level calculations? If you can imagine a calculation that can be done in a single row of data, that's row-level calculation. So imagine in my table I had, uh, previous year sales and current year sales, and then I want to subtract one from another.

7:43 So I subtract from current year sales, uh, the last year sales, and actually, I can do the calculation within, within one row of data.

7:55 I do not need aggregating anything. It's just in a single row. That's row-level calculation.

8:03 And what is it good for? Well, that's perfect for adding. It's perfect for subtracting. It's perfect for multiplying. And one more important fact, fun fact, all LOD calculations, all level of detail calculations, the fixes, the includes, the excludes, they are seen by Tableau as something that is row-level, and we will use it.

8:29 I will show that again in a moment. Okay. Then what about the aggregate logic? Well, we meet the aggregate logic once you're looking at charts. Okay?

8:43 I've got here very, very basic chart, just, uh, seventeen subcategories and sum of sales for each of the subcategories. So what happens on the picture? Well, I've got some dimension that ends up in labels, so I've got a label for each subcategory.

9:05 And, uh, then I've got some measure that ends up in showing an axis. Great. We've got that. How does it happen that I've got such a picture? Well, Tableau goes, uh, uh, Tableau takes a subcategory like phones, go back to the table, looks at all the cells that contain sales and are, and apply to these phones, and sums them up or aggregates them in other way, gets one number, and the number is used to draw the bars.

9:44 And that's how Tableau is drawing things, and to be honest, most of other BIs as well, BI tools. So yeah, that's pretty common. Okay. So we've got here kind of aggregate logic. What you see here are aggregates. Okay. So two important, two important points here. One of them is that dimensions define granularity or level of detail of the view. What does it mean?

10:12 It means that the dimensions decide into how many pieces your view is chopped, just in the simplest word, uh, words. And where you need to put the dimensions to be able to chop the view, well, you can put them on rows, columns, on, or on marks with the exception of tooltip.

10:34 Okay. And then measures.

10:36 By default, measures are aggregated in the view. Okay?

10:42 But sometimes dimensions can be aggregated as well. So what's the difference?

10:47 Measures are aggregated by default. Dimensions are aggregated when we want that. So that's the difference.

10:54 Okay. And then what would be aggregate level calculation? Because I'm talking about the view, not about the calculation. Aggregate level calculation is calculation that uses aggregations inside, like sum sales plus sum profit plus something. These are aggregates, and that's aggregate level calculation.

11:17 Okay, what aggregate, uh, level calculations are used for and needed for? They are needed for division, definitely.

11:26 They are needed whenever you use table calcs because all table calcs are seen by Tableau, even something as simple as index, are seen by Tableau as aggregates.

11:39 And then whenever you have one aggregate in your calculation, everything else has to be aggregated too. You cannot mix aggregate and non-aggregate values within the calculation. That's the meaning of the statement.

11:54 And when I start saying that, it means my beast might instantly wake up, and we will see the problem. Okay.

12:03 So let's move now to Tableau, and let's try to, uh, to find some fixes. Okay. My first use case.

12:13 What I want to do here is for every region that I've got, count the number of orders in the technology category. And I'm sorry, I will be cheating a little. I have pre-prepared my calculations, so we will start with something- Half-baked.

12:30 Okay, so I go to the calculation that I have prepared here, make it slightly bigger because otherwise it would be unfair. And what do we have s- here? I say, if my category is technology, uh, then count distinct number of order IDs.

12:51 That sounds logic, yeah? But Tableau says, "You cannot aggregate, and you cannot mix aggregate and non-aggregate," et cetera. How fun. Okay, so what's the problem? My category is row level. My count distinct is aggregate level.

13:12 That does not quite work together. What I can do, well, first, I will get rid of this count distinct.

13:23 Great. I've got it. And let's try to read it aloud right now.

13:28 If my category is technology, then please take order IDs.

13:36 Okay, great.

13:38 And actually, it ha- I've got the bunch of these IDs that match my condition, and I can now count distinct them. So what I can do is to put my aggregation in front of the brackets,

13:54 and now sh- it should work perfectly. As you can see, we've got this lovely gray, uh, label underneath.

14:05 Uh, lovely, uh, message underneath. I love the color.

14:09 Uh, so yeah. Now I can apply… Uh, uh, click Apply and drag it into my view, and it works perfectly.

14:18 Oh, may- we, we should make it slightly lighter and labeled. Yeah. Now it's beautiful.

14:23 So w- the very first method of taming the beast is to putting, to put your aggregation in front of the brackets. And one pro tip, uh, if you try to do that, try to read it aloud. If it sounds logic once you do that, it might… it w- should work. If it sounds ridiculous, that's not the option. So if I read here that if I take, uh, those c- only technology category and only order IDs that do fulfill this, uh, condition, then I can count distinct them.

15:01 That's logic.

15:02 So yeah, that's a good, good way to do that. Okay. That's my first, uh, that's my first method, but it's not the last, unfortunately. So let's go to the second.

15:14 This time, I would like to change a measure with a parameter. I've got a parameter here that changes between sales, profit, and profit ratio. And of course, when I change, nothing happens. Why? Because I have used that nowhere. So I need to use it in some calculation.

15:33 I go to Calculation. I've got… Yeah, I've got it pre-prepared.

15:38 I go to Edit, and what I've got here, well, it says, uh, in case my parameter is, uh, change the measure.

15:49 When the value is one, show sales. When the value is two, show profit. When the value is three, show profit ratio. Looks perfect.

15:58 It's just, it's not perfect somehow. Tableau says you cannot, et cetera.

16:06 Okay.

16:07 Uh, what a pity. So what's the problem? Let's check what is wrong with this. I can go to the right part of my window, and when I click on Sales, I see that that's just a field from database. Similarly, Profit, but when I go to Profit Ratio, the formula for that is sum profit divided by sum sales. So it's already aggregated inside the calculation, and I'm using a field that has been pre-aggregated.

16:38 So this is row level, this is row level, and the profit ratio is aggregate level.

16:45 What can I do in this case? Well, in this case, I can actually aggregate everything that is not aggregate yet.

16:55 So to make it tricky way, I will find sum here, double-click Sales, double-click Sum, double-click Profit, double-click Sum. And now everything is aggregate, and my calculation works well.

17:11 Uh, I can see that it's valid. And by the way, uh, another pro tip, uh, the… if you aggregate everything in such a calculation, uh, you will also get better performance, so it's worth doing. Okay.

17:29 Apply.

17:30 Okay. And now I can add my, uh, I can add my calculation to the view. Let's make it beautiful. Yeah. Now it's what I wanted to get. And when I change my parameter, it works better, perfectly with every option. So if you can, uh, aggre- if you can, aggregate what you have to be aggregated.

17:55 And, uh, well, it works also with dimensions. So my another example is that I want to color subcategories that have, uh, sales, summary sales, the sales in my chart, uh, which is about, uh, 300,000.

18:17 But I want to color them each with different color. So for that, I need a good calculation.

18:25 Of course, I have pre-prepared something, so I go to Edit, I make it bigger, and let's have a look at that.

18:34 Oh, even bigger would be nicer.

18:37 Uh, okay.

18:39 If my sum of sales is greater than 300,000, then I want subcategory to be colored. Yeah.

18:51 Um, here I've got aggregate, here I've got non-aggregate value. What can I do about that? Can I disaggregate my, uh, sales and move sum to the front, m- move it in front of the brackets?

19:07 M- take the whole calculation into brackets and then sum it? Not really, it won't make sense.

19:13 Can I make it row level?

19:16 No, because then Tableau would check in every tiny cell if the value in the cell is greater than 3,000… 300,000. That's not also the option.

19:30 So I want to leave that as aggregate. What can I do? I can aggregate my, uh, subcategory. How do I do that? Well, I can choose a couple of different aggregations.

19:44 Minimum, min, would work. Maximum, m- max would work as well. And then also ATTR would work, but that's the slowest of the three, so please choose either minimum or maximum. What do minimum and maximum do when we apply them to texts?

20:02 Well, uh, minimum takes first, uh, first value in alphabetical order.

20:10 Uh, maximum takes the last value in alphabetical order.

20:18 Uh, yeah, that's what they do. So I will use minimum because that's what I do usually. Each of these would be okay.

20:30 Minimum.

20:31 And now my calculation works perfectly. Does this first value in alphabetical order play important role here? Well, actually, what this calculation does, it checks in with every bar that I have here. Ex- for example, bar for chairs.

20:50 If the bar for chairs is gr- longer than 300,000.

20:56 And I'm checking that for each bar separately. So for each bar separately, I'm counting this minimum of subcategory. For chairs, minimum of subcategory would be chairs. For phones, phones. So that should work perfectly. No problem with that. Okay.

21:14 I click Apply.

21:15 I use it on color to prove that that was a good attempt, and yeah, it works as I wanted it to work.

21:22 Okay.

21:23 But sometimes it's not that simple. Sometimes it occurs, uh, that

21:32 we have to think about what is there first in alphabetical order, and let me show the example.

21:40 Okay, I will…

21:43 I've got here a nice filter which chooses one of the subcategories with option to choose all of them at once, and I want to write in my, uh, in my label, in my text, I want to provide information about sales per subcategory as, as a t- as a text.

22:04 So I have pre-prepared calculation which says, "Sales in subcategory is," the name of subcat, uh, "Sales in subcategory," the name of subcategory, "amounts to," and then the value. Okay?

22:23 And we've got error, sure. So what do you expect? You cannot aggregate non and aggregate values. However, it's not.

22:32 What Tableau says? Tableau says you can't add string values and float values. Okay, what's the problem?

22:39 Uh, these are all strings, and my sum of sales is number. Okay, I have to change it.

22:46 I'm lazy, so f- before I change it to string, I will change integer to get rid of amount places which would mess here.

22:55 Integer. And then I will add STR function to change it to string, and it should work.

23:04 Should, should it?

23:06 Well, let's check. You cannot mix aggregate and non-aggregate values. How fun. Okay, what's the problem? The problem is that my subcategory is row level, and my string is aggregate level. I've got sum in here. Well, l- let's check what will happen if I do it just the same way as previously. So add minimum to the subcategory. Minimum.

23:30 Great.

23:33 I've got my minimum. I click Apply.

23:36 And now I can drag the calculation to label, label.

23:44 And, well, it says, "Sales in accessories amounts to 167,000 something." Great.

23:52 I'll check it for bookcases.

23:55 That one looks good, okay, as well. And then I go to All, and I learn that sales for accessories amounts to 2 million and something.

24:05 It was 160,000 something a moment ago, and now it's over 2 million. What's, what's wrong?

24:14 The calculation cannot…

24:16 Such a calculation cannot be good. If it's sometimes good, it's just bad. So we need to improve something here.

24:24 Well, what it does, when I take just… When I filter out just one subcategory, it calculates the first in alphabetical order value for the subcategory. So for art, it's art. For envelopes, it will be envelopes. But when I go to all, I've got plenty of subcategories in my filter, and now it takes the first one that of all of these. So obviously, in this case, it's accessories.

24:58 And I have to make the calculation slightly better, uh, and make proof to that problem. So what I will do, I will use the definition of, uh, ATTR, which Chris has quoted in chat a moment ago. Thank you, Chris, for that.

25:17 Uh, easier for me.

25:20 I will check if minimum of my subcategory, let's just copy that,

25:28 equals the maximum, and let's change it to max.

25:35 Because if it's, if it's equal, it means there is just one subcategory filtered.

25:43 So then I will show what I, I have pr- prepared. And then I can write else.

25:53 I want to write

25:58 total amount.

26:00 Uh, total sales, sorry. Uh, total sales amounts to

26:08 space,

26:11 plus.

26:13 Okay. And now I will put here the string I have prepared earlier, and and in the end.

26:22 Pretty complicated, but once you know the logic of that, it's easy to be done. So the most important is to follow the logic, and then you will figure that out.

26:33 Okay.

26:34 I press apply. I make it smaller not to take half of the screen.

26:40 Yeah, let's leave it, and let's check if it works.

26:45 Uh, now my total sales amounts to two million something, and for art, we've got the number we need and the right subcategory. So that was another method of dealing with the beast. And as you can see, it works. But we've got one more method, which is slightly different than all the other before because it uses LODs.

27:09 Okay.

27:10 What I want to do in the picture is to color the last quarter.

27:16 And of course, I have pre- prepared calculation, at least I should have. Yeah, it is here.

27:23 Edit.

27:25 What I've got inside of here, to make it bigger, I will make… break it into two lines. Okay.

27:33 I'm checking if quarter of any date equals to the last quarter I've got in my data, to the final. The problem is, however, that my max is aggregate and my order date is not. Can I get rid of this max, putting it to the, in front of brackets? No. Can I make it row level? No, because I really need the max.

28:01 So what can I do? Well, I can put brackets around, and Tableau will say, "Wow, it's beautiful. I love it," instead of saying traditionally, "You cannot mix aggregate and non-aggregate levels." And for those, uh, who don't know what does mean these curly brackets, these, these, these mustachios without fix, it's equal to fixed, uh, column and max date.

28:33 It's just exactly the same, but I'm just lazy, and I do not wr- want to write too much.

28:39 It takes time, you know, my fingers pain, et cetera.

28:44 Uh, so yeah, I just leave it the simple way, and it states for the maximum date I've got in my, uh, data set. Okay. So if the quarter of the date equals the maximum quarter of order da- I've got in my data set, things should get colored. Okay.

29:05 I click apply.

29:08 I click okay, and check if it works.

29:12 Now, I have to find the calculation, which is a challenge. Yeah, I've got it.

29:18 So I drag it to color, and voila, it works. It works perfectly. So that's my fifth method. And now for a moment, I will get back to, uh, I will get back to PowerPoint.

29:34 Um, the problem is that even if you have the, uh, even if you have all these methods, and you have heard about them because I told you not to make notes, uh, you might not memorize them all. Five is a lot.

29:49 Five is a lot to…

29:50 I have just read a book where the author told that no one is able to keep in working memory more than four units, so that's five methods.

29:59 Uh, so how to know which one to choose, and how to know which one to apply in a given situation?

30:07 My th- my shortcut is to ask three questions. First question is, do I really need a row level calculation?

30:15 If half of that is aggregate, I really need it to be row level, but I cannot get rid of the aggregation, I use LOD.

30:24 Okay. But sometimes that's not the case. Sometimes I can aggregate everything. So another question is, can I put my aggregation outside the brackets? If I, uh, does it make sense?

30:39 And if yes, I just put my aggregation outside brackets. If no, then the third question is, will the… feel do I need to keep my filters in mind or can I just aggregate everything?

30:54 If that's measure, no problem, I can just aggregate everything. If it's dimension, well, if I do not have to keep, uh, if I do not have to keep the filtering in my mind, I can just aggregate. If I have to keep the filtering in my mind, uh, like with the label example, then you have to ag- uh, adjust your calculation to the situation, and that's it.

31:22 And if you want to have access to the file with everything inside, the QR code will run you to that. But as I got my extra couple of minutes from Chris, thank you again, I love the ti- the extra time, uh, I thought about showing you two more slide extras. The problem is that in such situations, Tableau often, uh, tells me, uh, I cannot mix aggregate and non-aggregate value.

31:51 That's hint that I can do something, but there are situation when the hints is not existent. It does not appear at all, and I want to show you two of such situations.

32:02 Uh, okay, I go back to Tableau, and my first example is with, uh, subtracting something from LOD calculation. So I've got here LOD that calculates sales by category, sales for furniture, office supplies, and technology. Pretty simple, you've got the formula. Great. And what I want to do is to subtract from sales by category my sales. Great. So let's do that.

32:36 I open the calculation window, Alt, A, C. If somebody want… Alt, A, C, clicked one by one if somebody wants to learn the keyboard shortcut.

32:46 Okay. I will call it just, um,

32:52 what I can call it? Well, test one.

32:56 If I don't know, I can use that.

32:58 So I drag my sum sales by… Uh, oh, no. N- that would be too quickly. I write, uh, sales by subcategory, and I subtract from that sales. Great.

33:12 I told you there that for adding and subtracting, row level should be perfect.

33:19 Yeah?

33:20 So I try to use that. I click Apply.

33:26 Uh, I look for my test one.

33:30 I drag it to measure values.

33:34 Great.

33:36 And…

33:38 Oh, that's not the test one. I must have had another test one before. Okay. And now c- I can see something like that, just written. Let's call it test 11 to make it more visible. Okay.

33:54 Now I've got test 11 in my measure values, and what you can see are these enormously big numbers.

34:02 My calculation is perfectly okay according to Tableau, so what's the problem? What has happened here?

34:11 So Tableau sees this sale by category as the number, in this case, uh, 700,000 something, uh, in each row. So in each row, Tableau subtracts from this number the value that is there in the cell for the row for sales.

34:32 So something pretty big from… And the subtracted num- the number subtracted is pretty small, but when you add them all, and we can see here sum of test 11, that gives us huge number, and that's not what we expect. As a result of this, something around 600,000. Yeah?

34:53 That's not the case.

34:55 So to get the result with LOD calculation, we have to use aggregates.

35:03 What I will do is dragging my sum of… sum sales by category and minus sum sales. Now I will click apply, and yeah, mushrooms.

35:16 The red mushrooms all around, uh, at least that's how I called it. Uh, so I will drag my test 11 once again to measure values, and now we've got the values we've expected, and that's completely different thing. So it's…

35:32 Well, to figure out what is happening here took me at least two years, so please memorize that or go back to that in my Tableau Public profile and use it because it's worth it.

35:46 Okay.

35:47 So the other example is on a map, and what you will see here is map of districts of Warsaw, uh, capital of Poland, where I live. Lovely.

35:59 And you c- can have a look at the map, and you've got area of each district on it, and, well, there's something wrong with it.

36:09 That one is 73, and that one is 73, and their area definitely does not match.

36:17 And that one, well, it's bigger than that one, but definitely not more than three times. And yeah, the area here is over 200 square kilometers. That's a lot, and I happen to know that that district is the smallest, uh, and that one has lower number. Definitely something is very wrong with the data.

36:43 Uh, what has happened here? Well, I have calculated area With this calculation extra to areas.

36:53 And it has been summed in my view. So if I've got more than one record for, uh, for any, mm, district, the number has been multiplied.

37:09 So the number has been cup, uh, counted several times. How can I avoid the problem in case of, uh, collect aggregation, uh, in case of maps? Well, let's go to this to area.

37:27 Okay. I edit that,

37:32 and it's just row level. Can I make it aggregate level? Yes, I can. And what aggregation should I use? The aggregation that is proper for geometry. What would that be? It's collect.

37:47 So I wrap it in brackets and put collect aggregation around, and again, it will get very red.

37:58 I click Apply. Okay.

38:01 Uh, yeah, I've got red, so I will drag my calculation once again. Now it says AGG, which states that aggregation is inside. And now just have a look. The one has the smaller number on my map. The one is more or less the same number as the one here. This also seem pretty similar. It looks okay.

38:24 So that's another example when we need have to think about aggregation by ourselves because Tableau won't suggest that, and it's also worth keeping in mind. And that's actually all I have prepared for today.

38:41 So if you want to, uh, copy the QR code, uh, I will show it for a moment again.

38:49 Uh, if not, then thank you a lot.

38:52 Just for the QR code, I will keep it here. Oh, thank you for, uh, copying the link to… Caroline, for copying the link to, uh, to chat.

39:03 Thank you a lot, and have a nice data day. Thank you.

39:08 Chris McClellan: That was awesome. I loved it.

39:12 Attendee: So did I.

39:14 Chris McClellan: There was a l- a lot in the chat and, and it's, it's interesting with this. I… When you actually said the, the, the thing I wrote down at the end is I remember, you know, when you put the if inside the condition, uh, inside the function, the first time I was shown that, and as I'm actually… Someone goes, "Oh, dude, you know, put the, put the if in the sum rather than the count." And I'm like, "It can't work like this." And then you press Enter and you go, "Oh, my God, that's the answer." You know?

39:42 And, and you sort of did the same thing. It was, it was, you know, a good explanation to say you can just, you can just do that, and it fixes a lot of things straight away.

39:50 Agata Mężyńska: Oh, yeah.

39:52 Oh, yeah.

39:53 Are there any questions that I have missed on my way and I need to answer?

40:00 Uh, well, for hitting calculation, find all of them on Tableau Public, so, uh, don't worry about that. You can get to everything. Uh, yeah.

40:12 Thank you, Chris, for, uh, defining ATTR.

40:16 Uh, that was really helpful.

40:19 Mm.

40:23 Okay. I think that's all. If you have any other questions, I'm, I will be more than happy to answer them either now or later via LinkedIn or, uh, or via email if you prefer.

40:37 I see nothing more, so yeah.

40:39 Chris McClellan: Awesome.

40:40 And we can come back for, for questions at the end, but there's Agata's contact details. So X, LinkedIn, Tableau Public, depends on where you prefer.

40:52 Same as a few people. If you can spell that last name properly, it's pretty easy, but that's the challenge.

40:58 Agata Mężyńska: Yeah. That's true.

41:01 Chris McClellan: That's cool. As you said, Agata gets you halfway there anyway, so.

41:04 Agata Mężyńska: Exactly.

41:06 Agata plus Tableau, and, uh, either you'll find me or Agata Ketterick.

41:10 Chris McClellan: Yep.

41:14 Okay. No other questions. We'll move on to Fast Five. So obviously, questions back from me to Agata, but these questions are really quick and easy. They're AI generated.

41:25 Um, I… You know, so you haven't seen the questions before, but it's not a ranking question at all. It's just personal preference.

41:32 Uh, if it gets too hard, you can always pass, but, um, I hope they're sort of light and fun the way they're supposed to be.

41:40 So the first question is: Is the simplest chart always the most powerful or just the most familiar?

41:47 Agata Mężyńska: In between.

41:49 It's usually the most powerful, provided you have no chance to explain something more difficult to your customers. If, uh, if you have chance to explain, things more complicated might al- might also work.

42:06 Chris McClellan: Got it.

42:08 And question two is: Do you usually float objects or keep everything tiled?

42:15 Agata Mężyńska: Oh, I'm Team Tiles, definitely. Uh, for performance reasons mainly.

42:22 So I float only things that I really need to float.

42:26 Chris McClellan: Mm-hmm. Definitely.

42:28 And question three is: Do you like using filters on the side or at the top?

42:34 Agata Mężyńska: Uh, preferably in a hidden container.

42:37 Chris McClellan: Yep, even better.

42:39 And do you build layouts first or charts first?

42:45 Agata Mężyńska: Layouts.

42:45 Chris McClellan: Cool.

42:47 And finally: Does the absence of color say something or say nothing?

42:52 Agata Mężyńska: It's always a message.

42:54 Chris McClellan: Sorry, it's always the message.

42:57 Agata Mężyńska: Uh, it's, uh, w- absence of color is still a color, so that's also-

43:02 Chris McClellan: Yeah

43:02 Agata Mężyńska: … a message.

43:03 Chris McClellan: Uh, and, and AI came up with that today. I thought it was a good one. I didn't know your presentation was going to have so many things about color in it, so it's always just random how it comes out.

43:13 Agata Mężyńska: Yeah.

43:15 Chris McClellan: Awesome. Okay. Thank you for that.

43:17 Um, Faraj put in the, in the chat that he's tiled. I'd sort of…

43:21 I think I float more things than tile, but I, I just sort of jump between the two all the time, so everything works.

43:30 Agata Mężyńska: Yeah.

43:32 Chris McClellan: Um, okay, so moving on. The next TUG meeting is in a few days' time.

43:37 Uh, Naveen's going to talk about narratives and how that applies to storytelling. Again, it's one meeting, uh, in Europe. People may not be there when it's 3:00 AM in the morning.

43:48 Um, but obviously built for more of a US audience because Naveen's in the US.

43:52 Um, so catch on with that meeting if you want to. QR code's there, or just on the Tableau user group's webpage as well.

44:01 And this recording and everything else that I do on the, on the Team DataFam TUG, Agata's TUG is on here as well. Everything's on YouTube at Team DataFam. There's also an audio podcast for Spotify and Apple, so you can listen to things while you're not at a computer.

44:19 And if you've got any questions, even if you want to present anything like that, any feedback, email me at team.DataFam@Gmail.com.

44:28 Um, but thank you, Agata. That was great to see that, um, as someone else said, I love your sense of humor. It was all through that with just nice little jokes and things just to keep it, keep it nice and lighthearted and, and the funny things as you go through as well, which is good. Thank you.

44:42 Um, but a few more things.

44:44 If you are participating in Iron Viz, as of the start of this meeting, you have 23 hours left to submit because it's the 21st of November, Seattle time.

44:55 So we're almost at the 21st of November. I think there's some people in Australia that are still, um, trying to get their entries complete and submitted and off. But you've got probably… What have we got now? Hmm, almost 22 hours left.

45:11 Um, but as, as I always say, win or learn, you can't lose. The theme is food and drink. If you don't know that now, then I don't know if you're gonna submit in time. Um, but during January, we'll see who the top 10 people are, and the top three will be on stage at TC'26 in May in San Diego. Uh, also, there's a Tableau Hackathon at the moment, so if you want to win some money prizes, uh, I'm particularly looking at this one.

45:40 Or when we were talking to Anne Jack- Ann Jackson a few weeks ago about her prizes through here.

45:47 Um, there's a Tableau Hackathon on at the moment. You get free access to everything Tableau. Tableau Next, Tableau Cloud, uh, Salesforce, Slack, Data Cloud, Data 360 now, you name it, to come up with something awesome.

46:04 Entries close on the 12th of January, 2026, so you've still got a few weeks to think about your presentation, build it, submit it through the Hackathon website, and, um, maybe you can win the grand prize of $17,000 as well. That's 17,000 US dollars.

46:23 Uh, more details on the website. There is going to be Slack channels, or there already is Slack channels. There's meetings, there's recorded meetings, there's documentation, a whole heap of things. Basically, what can you do in Tableau, any sort of Tableau environment, and submit that as a Hackathon entry.

46:43 But that's it for me. That's it for Agata. Thank you again for your presentation.

46:47 There's no other questions in the chat. Now's the last time to ask questions.

46:52 That's the end of the meeting.

46:54 Agata Mężyńska: Thank you.

46:55 Chris McClellan: No one's gonna say anything. Okay.

46:57 Wendy Small: Thank you, Agata and Chris.

47:00 Chris McClellan: Awesome. No worries. Bye.

47:03 Okay. Thanks a lot for your time. Talk to you soon.

47:05 Agata Mężyńska: Thank you.

47:06 Chris McClellan: Bye. Okay, bye.

47:07 Attendee: Bye.

Leave a comment

Your email address will not be published. Required fields are marked *