1 2 3 Previous Next 30 Replies Latest reply on Jan 26, 2016 2:15 AM by anneleen.deridder

    How to create a goal meter

    Justin Smith

      Anyone done any sort of goal meter to track say fund raising? If so, can you post an example?


      I don't have any sample data (or even a particular project pending on this), but I would like to be able to give various departments around the college a viz to post up showing where they stand on a project. What I'm thinking is two custom shapes that are identical except one being considerably more transparent. As the amount raised increases, less of the transparent image would be shown on the overlay relative to the percent raised of total goal.


      I guess this could be a variation of a bullet graph using a shape? Any thoughts on how this may be possible?



        • 1. Re: How to create a goal meter

          Why not just use a bullet graph?

          Anyway, see attached workbook for three possible options, including transparent bar.

          2 of 2 people found this helpful
          • 2. Re: How to create a goal meter
            Justin Smith



            Thanks for your help. I agree with the bullet chart, but I was thinking more along the lines of a tool for marketing. Although I realize it will be better and easier to read, that is not always the most important thing when it comes to marketing.


            I like what you did, but I was thinking more along the lines of custom shapes. Any thoughts?



            • 3. Re: How to create a goal meter

              Justin, can you sketch the look that you have in mind?

              • 4. Re: How to create a goal meter
                Jim Wahl

                Hi Justin,


                I've had success with something similar to the last example in Few's bullet graph examples:



                In particular, the current (dark blue) vs projected (light blue) helps people understand if they're on target to meet the goal (dark blue cross line). The shaded regions are 80% and 100% of the goal.


                This data is from a simple excel sheet with two tables (contributions and goals). You can see the original excel by renaming the twbx file with a .zip extension and then looking in the /data directory inside the zip.



                1 of 1 people found this helpful
                • 5. Re: How to create a goal meter
                  Justin Smith

                  Hey guys,


                  Attached is what I have been talking about. Maybe a little more clarity on my vision would have been helpful. Pardon the horrible image, mismatched colors, and the odd white line around the filled polygon. Another post led me to the polygon and it seems to work out OK. I would love some suggestions on adding a label at the top of the polygon if anyone has any thoughts.


                  The excel book I used is attached as well. By updating the amount in A2, the remainder of the workbook updates to draw the polygon.



                  • 6. Re: How to create a goal meter

                    Justin, your shape image didn't make it through. You need to save the workbook as packaged, .twbx, which should include all external files and data (extra bonus - you don't need to attach the Excel file).

                    All I could see was a red rectangle on a blank page, and an error about not being able to find the  '210_GoalMeter5.png'.

                    • 7. Re: How to create a goal meter
                      Justin Smith

                      Sorry. Sometimes I amaze myself - and not in a good way!



                      • 8. Re: How to create a goal meter
                        Noel Avison

                        Hey again Justin,


                        Here is what I did with your meter that might help you...


                        I took the existing polygons you had and tweaked them a bit. I renamed the polygons to Group A, Group B, Group C. Then point number is the same as well as the coordinates. I added a new field called "Point Type" which I will explain in a sec. Then I added "Amount", which corresponding to the amount of money each group has raised. Then I created "% of total" which takes the amount and divides it by the max which you set as 10000.


                        Group NamePoint #XYPoint TypeAmount% of total
                        Group A120.286.961100001
                        Group A229.7886.961100001
                        Group A329.7828.32100001
                        Group A420.228.32100001
                        Group B120.286.96153450.5345
                        Group B229.7886.96153450.5345
                        Group B329.7828.3253450.5345
                        Group B420.228.3253450.5345
                        Group C120.286.96123230.2323
                        Group C229.7886.96123230.2323
                        Group C329.7828.3223230.2323
                        Group C420.228.3223230.2323


                        Next I put these 3 polygons into tableau. If you notice they are all the same size, this is where point type comes in. Point type "1" corresponding to the top most points of each polygon and Point type "2" corresponding to the bottom 2 points. I make a calculated field called "Y Adjusted For Amount" with the formula:

                        CASE [Point Type]

                            WHEN 1 THEN [Y]-58.66*(1-[% of total])

                            WHEN 2 THEN [Y] 



                        Basically what this does is if [Point type] is a 1, takes the 1-"% of total" and and multiplies this by 58.66. 58.66 is the total difference from the top and bottom of a full polygon. It then takes this number and subtracts it form Y.


                        So what this does is for instance if %of total is 1, meaning 100%, or the full fundraising, it does [Y]-58.66*(1-1), or [Y]-58.66*0. This essentially leaves Y alone and you get the full polygon. If fundraising was at 0% it would be [Y]-58.66*(1-0) or [Y]-58.66. This would make your top Y values equal your bottom Y values essentially making your polygon disappear. Also when the data in the "Amount" field change, the polygons automatically change size.


                        Once you do this, you replace the [Y] field that is in the Rows shelf with the calculated field that was just made. Also in the background images menu, you need to change the [Y] to [Y adjusted for amount] otherwise the background image won't display.


                        Also I added a "Annotate Area" and added it to display the amount of funds in the bottom. You can't see the text in the first one because I made it white so it contrasted with the red, but the formula you type in the annotate area is Amount:<Amount>


                        Type playing around with the numbers in the data so you can see how changing the amount alters the size of the polygons. Also note that if you go over 10000, the polygon will get bigger than the meter. You can make a conditional statement in the data sheet though if you want there to be an upper bound if you want by saying =if(amount/total amount > 1, 1, amount/total amount) or something along those lines so that it can never be bigger than 100%, unless you want that, its up to you.


                        Edit-Oh I forgot to add, I duplicated the sheet 3 times and then used a filter on "Group Name" so that I only show one group at a time otherwise the groups are all on top of each other


                        Let me know what you think!


                        Edit 2- One more thing to note on polygons, whenever you have a field for point order, make sure tableau see its as a dimension, not a measure. To do this, just drag it from the measures area up to the dimensions area.

                        • 9. Re: How to create a goal meter
                          Noel Avison

                          Oh I made another change, I made an alternative way to input the data. Instead of getting the data from a data source, now you can put the data right in tableau. I created a parameter that lets a user input the data called [Group A Fund Raising]. Then I created a calculated field that said, "[Group A Fund Raising]/10000" called [User Input A]


                          This number is the percentage of how full this polygons should be with the number that the user inputs. This field, [User Input A] replaces [% of total] in our case statement:


                          CASE [Point Type]

                               WHEN 1 THEN [Y]-58.66*(1-[User Input A])

                            **** WHEN 1 THEN [Y]-58.66*(1-[% of total]) was there previously****

                              WHEN 2 THEN [Y]



                          The new field called [Y Alternative Group A] is what goes into the rows tray. Then you change the map so it displays with this new field. I repeated this for Group B and Group C and put them in a dashboard. So now to alter the size of the polygon, the user simply enters in a number in each of the parameters and the meters will get filled depending on what number is entered.


                          Let me know what you think!



                          • 10. Re: How to create a goal meter
                            Justin Smith



                            Thanks for your work on this. I was going to attempt to make it update based on amount such as you did, but I know your method is much better than I would have came up with. Your second attachment showing where you could change the amount within Tableau was a duplicate of the first I believe. I did not see the fields you mentioned creating in it. I would love to check it out to see how you did it. Also, what was the trick to getting the white outline to disappear around the polygon?


                            It looks awesome.


                            Thanks again,


                            • 11. Re: How to create a goal meter
                              Noel Avison

                              Ah,  you are right. It was the same file. Well I am not at home so I just redid it here. I will upload the other one when I get home tonight. Also to get the white outline to disappear, you go to the color on the marks tab and you click the carrot to get the color formatting options. You want to select the halo as the same color as the rest instead of automatic so that there is no white around the shape.


                              Here the new calculated field:


                              CASE [Point Type]

                                  WHEN 1 THEN [Y]-58.66*(1-([User Input]/10000))

                                  WHEN 2 THEN [Y] 



                              Where [User Input] is the parameter that is created. Instead of making an extra calculated field where is says [User Input]/10000, I just added that into this calculated field.


                              If you have any questions about parameters or any of the calculated fields, let me know.

                              • 12. Re: How to create a goal meter
                                Justin Smith

                                Very cool stuff. Thanks Noel!

                                • 13. Re: How to create a goal meter
                                  Noel Avison

                                  Here is that view I made over the weekend.

                                  • 14. Re: How to create a goal meter
                                    Bob Nims

                                    Hi Noel/Justin,

                                    Can you tell me how you got the polygon in the first place?  I am trying to recreate what you guys did.  If it's actually a file can you please give me a copy of it.  Looks like a project with merit.

                                    1 2 3 Previous Next