4 Replies Latest reply on Feb 11, 2019 12:55 PM by Dan Ribeiro

    Fixed LOD output not showing all values when dimension filter is used.

    Dan Ribeiro

      So from my understanding, a fixed LOD is calculated and executed before any dimension filters is applied and that does seem to be the case however what is puzzling me is the following:


      Fig 1. shows a simple output, based on player xG values that have been binned into certain ranges. In this particular output you can see the results of ALL players. As a result there are 2 columns that are effectively outputting the same value:

      1. Count([xG])

      2. Fixed LOD =  {FIXED [xG Bin 2]: count([X G])}


      Fig 1.png


      So the LOD expression should remain the same when I filter by the dimension player, but instead some of the values are omitted if the player doesn't have a corresponding value (see fig 2). So what is going on here? If the calculation is performed before the filtering why are these values omitted? And what can be done to bypass this as ideally I need this data included so I can plot an average xG distribution for comparative purposes?


      Fig 2.png


      I know that this can be bypassed by using parameters to select the player (and I already have done this set up as a last resort) but there are two major disadvantages to this approach:

      1. The parameter control is not context sensitive. At least with the filters I can create a hierarchy of sorts and make my control elements only show relevant values, ie: League > Team > Players. Without this option my dropdown box will have several thousand players listed.

      2.  I want to include this viz in a dashboard with other elements that are already controlled by filter controls, so it makes sense to do the same here.


      I asked a similar question a few weeks back but I believe the pertinent point may have been obscured due to my inexperience in tableau, however further research has helped me understand the problem and its context a little bit better so I'm hoping this should make it clearer. More than anything I'm interested to know the italicised bit above as I feel like this would help me understand what Tableau is doing in the background and aid with my development going forward and hopefully figuring out a solution to my problem.


      The workbook can be found here if needed:

      Tableau Public



      edit: This is what I'm attempting to replicate. The orange line is supposed to reflect the avg dist. whilst the bars show a particular players values. However if a player has hardly any shots you end up with the 2nd image instead





      Many thanks.


        • 1. Re: Fixed LOD output not showing all values when dimension filter is used.
          Michel Caissie



          If you look at your first screenshot, bottom left, you see that you have  24 marks.

          On you second screen shot you have only 12 marks.

          Each mark represents the a certain number of rows  define by the granularity of the view and Tableau computes each measure for every mark.

          So even if you see all the discrete xG Bin 2 values in the list because you set  Analysis - Table Layout - Show empty rows,   Tableau doesn't have a mark to put the value on.


          It doesn't mean that the FIXED lod occurs after the filter.  For example if you remove the xG Bin 2 from the view, you would have a single mark,  and  SUM(FIXED lod)  would return the same value whether you filter a player or not.


          The solution to your problem would be to do some data densification at the source.  Meaning that your data source would need to have at least a single row for each  Player - xG Bin 2  with a null value of XG. This way you would have 24 marks  and the FIXED lod  would display for every  xG Bin 2 row,  whatever the players filtering.



          1 of 1 people found this helpful
          • 2. Re: Fixed LOD output not showing all values when dimension filter is used.
            Dan Ribeiro



            Thank you for your response, funnily enough I stumbled upon a question this lunchtime, hinting the same thing. I had intended to investigate further today, resigned to the fact that there wasn't much I could do here, but it seems like your answer confirms this.


            Displaying 0 in null fields


            As far as I was concerned I knew that fixed LoD's happened before filtering so I was confused why it would not output values when it could calculate them. I see now that it needs a Mark as a 'container' to actually  'pad' the info/calculation with.


            I have a few followup questions, if I may:

            1. I obviously have a gap in my understanding in this matter. For future reference what should I research here to fully get to grips with what Tableau is doing in the background and how marks actually work (optional and not that important but if you would happen to know some key words here to help narrow my search then I would appreciate it).
            2. My dataset actually consists of every individual shot on goal by every player on each separate row which is then binned within Tableau. ie:


            player 1 | team A | x | y | xg Value | ................

            player 1 | team A | x | y | xg Value | ................

            player 2 | team B | x | y | xg Value | ................


            I am somewhat unclear with what you propose... Would this mean that for every player I would need to add an extra 12 rows with xg Value of 0 (or more specifically null), as well as creating an additional column for xG Bin classification for each shot? (again I'm more than happy if you simply point me in the right direction here if the answer is convoluted)


            3. Finally, seeing as the bins are actually created within Tableau, would it not be possible to simply create this dummy data within a calculated field or is this line of enquiry/research a dead end?


            Many thanks for your help here. I truly appreciate it



            • 3. Re: Fixed LOD output not showing all values when dimension filter is used.
              Michel Caissie



              First thing you can check this video from Joe Mako on data densification

              Tableau Request Live - Data Densification on Vimeo


              Now I realize that your dimension xG Bin 2 was binned in Tableau and is not already bin in the datasource.  So to have all marks, each player would need an XG value in all bin ranges, which obviously is not possible and would not make sense.

              Any change you could upload a package workbook to play with it.




              • 4. Re: Fixed LOD output not showing all values when dimension filter is used.
                Dan Ribeiro



                I use Tableau Public so unfortunately I can't save to workbook.  You can find the online version here and download it accordingly, it should have all you need. If however that's not the case, let me know and I can always send you the data separately along with screenshots of setup and formulas (for LoD, xgBin 2)


                Tableau Public




                Also thank you for the link, I shall watch it later once i get some time