Can someone please explain the ATTR Function in Tableau
Asked Answered
C

3

6

I know that the ATTR function is used for aggregation, but can someone explain it in simple terms?

Cosgrove answered 22/12, 2015 at 12:48 Comment(1)
can you please elaborate?Dundee
Z
8

In the most simplest of terms, ATTR returns a value if it is unique, otherwise it returns "*". I think you'll find this link helpful with examples.

https://www.interworks.com/blog/tcostello/2014/05/15/attr-tableaus-attribute-function-explained

Zedoary answered 22/12, 2015 at 14:22 Comment(1)
Agreed. This was helpful.Zoonosis
L
3

You cannot mix aggregate and non aggregate comparisons in tableau, you have to use ATTR, for e.g. if ATTR(segment) ='Corporate' then sum(sales)

Leveloff answered 26/4, 2016 at 3:41 Comment(0)
W
0

ATTR is like using an already aggregated field for comparison with another aggregated field. Measures are taken as aggregated fields while dimension's aren't. If you have created a field which is already aggregated and still you want to use this field as measure it will be shown as ATTR as it cannot be further aggregated but is behaving like it has.

Weinstein answered 24/9, 2020 at 5:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.