Data Viz Done Right

April 5, 2016

Tableau Tip Tuesday: Compare One Dimension Member to All Others With LOD Calcs

6 comments

This week’s Tableau Tip Tuesday continues the series on LOD expressions. This week I show you how to compare one member of a dimension to all others in the same dimension. For example, you might want to see how the profitability of Binders is doing compared to all of your other product sub-categories.

If there are other videos you’d like to see, please leave a comment. I’m always looking for new ideas.

6 comments :

  1. Really enjoying the series on Level of Detail expressions -- this here is a great real-life use case!

    I'd be interested to see if you come upon any strange cases when using this type of LoD techniques ("select one value of a dimension") on a viz which uses both Grand Total feature and Show Filters on a component dimension... I've come upon some head-scratchers trying to get that sort of thing to work.

    ReplyDelete
  2. Great tip, thanks for sharing!

    ReplyDelete
  3. Thanks Andy, all your posts are great source of creativity and knowledge. What changes should be made when you are using aggregated measures and dimensions I am ?trying to apply this Tableau tip to a viz I am working on. I want to compare the % favorability a group of recruiters is obtaining from a customer survey.

    [% Recruiter Favorability] = SUM(If [Response]='Favorable' then 1 ELSE 0 END) / total(SUM([Number of Records]))

    I am not able to compute the LOD

    { EXCLUDE [Recruiter] :
    SUM( IF [Recruiter]=[Select Recruiter] THEN
    [% Recruiter Favorability] END) }

    Do you have any tip? thanks much in advance

    Luis

    ReplyDelete
    Replies
    1. You need to split your % Recruiter Favorabiilty into two separate calcs: one for the numerator and one for the denominator. Then aggregate each of those and divide them.

      Delete
  4. Andy, i wanted to do something similar and i have been failing to achieve it when a filter is applied. I want to compare baseline values in the same table with other values however i have other dimensions that i need to apply filters on. every time i do that, my baseline values disappears due to the behaviour, how can i keep the baseline visible at all times without using blend.

    ReplyDelete
    Replies
    1. If you use a FIXED LOD, then that will "stick" irrespective of the other filters.

      Delete