7 Replies Latest reply on Feb 8, 2019 10:38 AM by Caitlyn Garger

    Lookup Value

    Caitlyn Garger

      Attached is a workbook using Tableau Desktop 2018.3.2


      I have this one worksheet labeled '% of Games Started' where I wanted to show the different PGs for the Knicks since 1994. I wanted to add one last visual to the worksheet where the shape of the point is different for seasons where the PG with the most games started is different than the previous year. I tried writing this calculation but it is not working correctly:


      I already have a calculation for "Who Started the Most Games" where it finds the PG who started the most games for that season. I just can't get the 'New PG?' calculation to work correctly.

      tableau shape help 1.PNG


      Would love to hear any feedback!

      Thank you!

        • 1. Re: Lookup Value
          Jim Dehner

          is this where you were going



          A number of changes including aggregating the starts count and the game counts - you can go through the details


          this is the revision to the who started



          the workbook is attached



          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

          • 2. Re: Lookup Value
            Caitlyn Garger

            Not exactly. I'm looking for all of the following seasons to have a shape that represents 'New PG':














            Because the previous year, a different PG had the most starts out of all PGs on the team at the time.

            • 3. Re: Lookup Value
              Norbert Maijoor

              Hi Gaitlyn,


              Find my approach as reference below and stored in attached workbook version 10.5 located in the original thread.




              1. M1. player max: {fixed [Season (Point Guards)]:max(if [MAX Games Started For Season]=[GS] then [Player] END)}


              2. Drag M1. player max on colour


              3. Based on this approach it's clear that more then 2 players over time where in this position


              Hope it helps.




              • 4. Re: Lookup Value
                Jim Dehner

                Sorry -

                don't have time to dig through it now - maybe later in the day -

                but directionally your calculations need to be aggregated then you need to incorporate LOD's to fix the data that the "season": level

                before you do the lookup calculation to compare to the previous value

                • 5. Re: Lookup Value
                  Caitlyn Garger



                  I'm sorry I wasn't clear in my question. I am actually looking to bring attention to seasons where the main PG was different than the previous season.


                  So for example: In the 1996-97 season, Chris Childs was the main PG but then in the 1997-98 season, Charlie Ward took over that role. Therefore, I wanted to change the shape for the 1997-98 season to show that a new PG took over the main PG role. Above in my response to Jim earlier, I wrote all the seasons where this should be true.



                  • 6. Re: Lookup Value
                    Caitlyn Garger



                    I have tried applying some LOD's to fix it at the 'season' level but haven't had any success. I also am pretty new to LOD's so that might be the issue as well.




                    • 7. Re: Lookup Value
                      Caitlyn Garger

                      Jim DehnerNorbert Maijoor


                      So I wanted to share with you both the solution! A coworker and I had some time to sit down and work through it and we actually stumbled upon the fix by accident. Jim Dehner, we incorporated your calculation for "Who Started The Most Games?" as shown below:


                      Kept the same "New PG?" calculation as shown below:


                      Next thing we did was drag "Player" onto the details shelf and edit the table calculation for "New PG?" to include all the specific dimensions. But we noticed that didn't change much so we just removed the "Players" from the table calculation and details shelf and then all of a sudden we ended up with the viz we wanted! (shown below)



                      It looks like the dimensions/measures in the details part of the marks card were interfering with the ‘level’ of my calculation.


                      Thank you both again for your earlier insight!


                      Attached is the workbook with the updated and improved viz.




                      1 of 1 people found this helpful