3 Replies Latest reply on Dec 28, 2016 6:01 AM by Jeffrey Kritzman

    Color changing progress bar by counting values


      Hey everybody,


      I am new with Tableau and trying to create some worksheets I just created in Excel. Actually, I guess this is a typical kind of analysis with Tableau but unfortunately I can not get it done by myself.


      Attached you can find my example from Excel. This is how it should look like in Tableau. In Excel there is no dataset either, so I want to give a little introduction to it.

      I'd like to track mistakes students do in their exams and organize them. Therefore, every mistake itself will get an unique ID and a few information like the mentioned "level of education" and the status if it was reviewed/corrected already or not.


      I want to determine a maximum amount of mistake for every educational level and count how many mistakes the student has done so far. So the dashboard should give me an overview about the mistakes made so far for each mistake level as a share of the maximum. The latter should be visualized by the simple number/counter, like shown in the picture, as well as in form of the progress bar, which is getting darker the more mistakes a student did so far. Important to me is, all three bars should have the same length regardless of the counter and the maximum should get "overran" counterwise but not regarding to the length of the bar. The bar should also grow up by each mistake, it should not be only one field that switches the color.

      For example: The student has made 8 mistakes at level 1. So he overran the maximum of 5. The bar should has the full length and be colored in a dark tone. The counter shows 8/5. OR The student made 2 mistakes at level 1. The bar has the same length but only 1/5 is colored in a light tone and the counter is on 2/5.


      Later on I would like to add some filters like "which kind of exam" or "which topic". I guess that wouldn't be the problem then. Furthermore I'd like to track all mistake (sum of all made mistakes regardless of the level) in a fourth bar. That should has a given length which is colored depending on the status of the mistake. When the student made 21 mistakes so far and reviewed none of them, the whole bar should be red. When he already reviewed some, than the bar splits in green (reviewed) and red (to go). When the student did no mistakes, the bar shoud be grey. That will be pretty much a stacked bar i guess but the point here would be the length of the bar, which should be fixed.



      I know, this is really much to ask for at once. But I don't expect any complete solutions or so at all! I am just looking for some hints, keywords or approaches so that I can try out! Maybe there is an easy solution but I am thinking to complicated...


      Thank you very much for any support in advance!

        • 1. Re: Color changing progress bar by counting values
          Jeffrey Kritzman



          This should be pretty doable in Tableau, but it would be a lot easier if we knew what the data looked like.  That will affect how you need to proceed.


          If you have a list of all errors, with each line being a unique error specifying which type it is, you could put Number of Records on the Columns card and Error Type on Rows, and that would get you the beginnings of your graph.


          I'm still not sure exactly how you want to use color, but it sounds like there are different tiers depending on number of mistakes.  In that case, you could create another calculated field along these lines:

          IF Number of Records > 10 THEN "Purple"

          ELSEIF Number of Records > 5 THEN "Blue"

          ELSE "Tan"


          Then put this on color, and edit the color pallette as

          • 2. Re: Color changing progress bar by counting values

            Hi Jeffrey,


            thank you for your quick reply. Every mistake has it's own unique ID, yes, and also one mistake-type which is not unique. Every single mistake has it's own line with additional information, so 100 mistakes = 100 lines = 100 mistake-IDs but NOT 100 mistake types. I assign these types to those three mistake levels. Therefore I created an additional field "Mistake Level" using an IF-function. So, every unique error has it's level tag because of it's type. In my worksheet I am counting the total number of create mistake-levels to get the whole number of mistakes of each level, e.g. 40 of those 100 mistakes are simple spelling-errors of easy words (level 1) and 15 mistakes are basic grammatical ones, my worksheets shows me 55 mistake on the level-1-progress-bar.


            What seems to be kinda tricky is the usage of formats in this case. Like shown in the screenshot I attached, there should be a counter behind every progress bar. But first I will give it a try by my own. When I get any issues I will ask here again

            • 3. Re: Color changing progress bar by counting values
              Jeffrey Kritzman

              Sounds good.  You might be able to get there using the Label card, but to get closer to that format I'd suggest creating a Text type worksheet, and combining them on a dashboard.