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]
"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!
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)
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).
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 *
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?
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])
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?
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 ruclips.net/video/SAXvMIG5ZOM/видео.html
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.
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.
@@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.
@@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.
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]
Great detail here James. I'll give this a go I think i see what you mean. Will report back.
"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!
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)
I've read about ATTR in Tableau eLearning as well LinkedIn Learning. Your version is the most comprehensive yet concise explanation.
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).
Very useful and lucid explanation mate
Thanks Tim for this detailed video on ATTR().
It was very useful to understand the basic concepts, use cases and limitations of ATTR()
Thank you Tim, you explained it in a super simple way.
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 *
Great point!
you probably already know this but you are the best.
Very Helpful Video. thank you
Glad it was helpful!
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?
Thank you for the details. I love details! 🦋
Thanks Tim. It was a great video.
How do we create the data hierarchy like you have for location?
I want to find the sum of the attribute amount. How can i do that?
Nice one !
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])
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?
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 ruclips.net/video/SAXvMIG5ZOM/видео.html
may i know the difference between ATTR(Boolean value) and Boolean Value. Both Should be same but they aren't. Please help
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.
@@TableauTim Query resolved with the video. Thank you
Tim which Tableau version you are using?
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.
Do you have an email? I have a sorting problem I was hoping you could help out with?
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.
@@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.
@@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.