What is ATTR (...) aka Attribute Function in Tableau?

Поділитися
Вставка
  • Опубліковано 21 гру 2024

КОМЕНТАРІ • 32

  • @emeryjl
    @emeryjl 3 роки тому +1

    Thanks for the tip of turning a dimension into an attribute on Details.
    The limitation on sorting Attributes isn't quite correct. The reason you cannot sort the ATTR in the example is because it is on the right. If you move ATTR to the left, you can sort by ATTR but not by field itself. Even that isn't exactly true. While you cannot see the sort, it does store the sort. If you put [Sub-Category], [Attr sub-cat], and [Product Name] on Rows and try to sort by [Attr sub-cat], nothing appears to happen. If you remove [Sub-Category], however, the view will switch the the sort you applied to [Attr sub-cat]

    • @TableauTim
      @TableauTim  3 роки тому +1

      Great detail here James. I'll give this a go I think i see what you mean. Will report back.

  • @svetlana_kapranova
    @svetlana_kapranova 3 роки тому +6

    "Attribute in Views" tip (10:24) looked like magic for me!
    By the way, I have an use case for that: I had to include an Worksheet Action using Opportunity ID in detail to return the link to Salesforce Opportunities in the Tooltips and, as some Opportunities have more than one product, the inclusion of the Action returned the effect of splitting the bar chart, as you showed in the video.
    Turning Opportunity ID into an Attribute solved this issue!

    • @TableauTim
      @TableauTim  3 роки тому +3

      Boom great use case... Building actions for URL actions is a really common example of this. Wanted to avoid explaining URL actions in the video itself. exactly what I was calling out at (13:00)

  • @PatrickBateman12420
    @PatrickBateman12420 3 роки тому +3

    Awesome explanation Tim! We used ATTR() in a Calculated Field where we wanted to convert a string dimension into an aggregated measure with ATTR():
    IF ATTR(LEFT(STR([Amount]),2) = "10") THEN .... This function essentially extracts the first two digits, converts them into an aggregated measure, and allows us to compare it to a statistical measure (on an aggregated level).

  • @mroth3331
    @mroth3331 3 роки тому +1

    I've read about ATTR in Tableau eLearning as well LinkedIn Learning. Your version is the most comprehensive yet concise explanation.

  • @equiwave80
    @equiwave80 3 роки тому +1

    Thanks Tim for this detailed video on ATTR().
    It was very useful to understand the basic concepts, use cases and limitations of ATTR()

  • @naveenu4
    @naveenu4 3 роки тому +3

    Very useful and lucid explanation mate

  • @sauravchaudhury802
    @sauravchaudhury802 3 роки тому +2

    Very well explained Tim !! Just a quick addition is that ATTR makes a great use case to find out if there is Many to Many relationships within the data .. the example of State and City you cited establishes that ..usually 1 state -> Many Cities .. but reverse only when 1 City -> Multiple States , its showing *

  • @rahulsaldanha9111
    @rahulsaldanha9111 3 роки тому

    Thank you Tim, you explained it in a super simple way.

  • @Gram394
    @Gram394 3 роки тому +2

    Love your videos! The grand total will work correctly and perhaps better to not use the attr by having your calculated field as If [Category] = X Then [Sales] End. Then aggregate in the view?

  • @danke.palaestina
    @danke.palaestina Рік тому

    you probably already know this but you are the best.

  • @myronlewis5752
    @myronlewis5752 2 роки тому +1

    Very Helpful Video. thank you

  • @AliciaMarkoe
    @AliciaMarkoe 3 роки тому

    Thank you for the details. I love details! 🦋

  • @sherlockholmes3385
    @sherlockholmes3385 2 роки тому

    Thanks Tim. It was a great video.

  • @shubhamaggarwal2642
    @shubhamaggarwal2642 11 місяців тому

    How do we create the data hierarchy like you have for location?

  • @kylaalexander5082
    @kylaalexander5082 5 місяців тому

    I want to find the sum of the attribute amount. How can i do that?

  • @myronlewis5752
    @myronlewis5752 2 роки тому

    may i know the difference between ATTR(Boolean value) and Boolean Value. Both Should be same but they aren't. Please help

    • @TableauTim
      @TableauTim  2 роки тому

      Do you have a screen shot you can share via. link or can you explain what else is in the visualization in terms of detail and marks pane.

    • @myronlewis5752
      @myronlewis5752 2 роки тому

      @@TableauTim Query resolved with the video. Thank you

  • @sruthiselvaganesan1793
    @sruthiselvaganesan1793 2 роки тому

    Nice Video😇, I have a use case where i should get an aggregated value based on the date values to find out the MTD based on parameter , which pushes to use 'attr' function , but the result is null. it looks like because the date column is a continuous field it happens. is there any work around ?.
    this is the measure i am trying to solve but it always gives null .
    If attr([Date]) >= ([StartDate])
    and attr([Date])

  • @sachinroge3509
    @sachinroge3509 3 роки тому

    I have US data. with that I want to create a geographical map with top 10 land area and top 10 water area.I am not understanding how to apply filters over here. I want help with this. can you tell me how am i going to do that?

    • @TableauTim
      @TableauTim  3 роки тому

      Hi Sachin, this video is about the attribute function in tableau. If you post this question on the Tableau forums that might be a better place. This guide on mapping might be a great start help.tableau.com/current/pro/desktop/en-us/maps_howto_simple.htm for context. And it also sounds like you’re using spatial data that you’d like to merge so you might need to look at some data prep resources for tableau prep which I’ve made a video about here ua-cam.com/video/SAXvMIG5ZOM/v-deo.html

  • @Neehal_vid
    @Neehal_vid 3 роки тому

    Nice one !

  • @agrim8863
    @agrim8863 3 роки тому

    Tim which Tableau version you are using?

    • @TableauTim
      @TableauTim  3 роки тому +1

      2020.4.1 but this feature has been available since forever so the advice applies everywhere. As long as you use the American data set you can create your own examples quite easily.

  • @michaelsmith1076
    @michaelsmith1076 3 роки тому

    Do you have an email? I have a sorting problem I was hoping you could help out with?

    • @TableauTim
      @TableauTim  3 роки тому +1

      Ask it here or in the Tableau forums you'll get an answer. I wouldn't take on questions by email anyway. The main reason is if i hlep you in an email, the community and others who come here don't benefit. And at that point I'm essentially offering out free consulting if its one to one.

    • @michaelsmith1076
      @michaelsmith1076 3 роки тому

      @@TableauTim I'm using a date selector and sorting by top ten. It used to leave out mesures that should have been in the top 10. I added the date filter to context and that fixed that problem. The problem I am having now is that I have multiple instances where the number of records are a duplicate and it won't include all of them. For example I have 5 measures that occur 6 times but it only shows 4 then skips to the measures that have 4 occurances.

    • @TableauTim
      @TableauTim  3 роки тому

      @@michaelsmith1076 okay this doesn’t relate to the video. Are you able to share a screenshot via imgur with the setup you describe for full context. You shouldn’t need to use context but I’m struggling to see what you’re building so an image will help.