13 Replies Latest reply on Jul 21, 2017 6:43 AM by Mike Heenan

    Tableau running slow

    Mike Heenan

      I have a small data source (300 rows by 15 columns, as an extract)  that I'm using to essentially vlookup based on entries in parameters.

       

       

      I have 13 total parameters that a user fills in. There are then 10 calculations that look at the results of 3 of those parameters and returns a variable value for the row where each matches (using if and then statements).

       

       

      I then have a graph with these 10 variables as measure values to make a connected line graph.  Whenever I change one of these parameters, it takes over a minute to load the new line graph.

       

       

      I have some other text tables that change very quickly when the parameters change. It seems to only be the line graph with measure values based on the vlookup type formulas that run slow.

       

       

      Any idea on how I can make this more efficient so it runs faster?

       

      Workbook attached.

       

       

      Thanks!

        • 1. Re: Tableau running slow
          Tom W

          Hi Mike,

          It's hard to give specific advice without a copy of your workbook. Here's some general advice - 6 Tips to Increase Dashboard Performance

          1 of 1 people found this helpful
          • 2. Re: Tableau running slow
            Mike Heenan

            Hi Tom - I've attached a workbook with an example of my issue. Changing any parameter takes over a minute to change the line graph.

            1 of 1 people found this helpful
            • 3. Re: Tableau running slow
              Jay Morehart

              the performance hit is most likely in the calculations you could take and extract and optimize it. Other than that I can't say without seeing the workbook, could you post a packaged workbook? Packaged workbooks: when, why, how

               

              Hope this helps

              • 4. Re: Tableau running slow
                Mike Heenan

                Hi Jay - thanks for the response. Packaged workbook attached here - you will see that changing any parameter takes over a minute to affect the line graph.

                • 5. Re: Tableau running slow
                  Mihai Constantinescu

                  It actually takes 18seconds to load the line graph and the rest for Table 1 tab so I think the problem is there.

                  • 6. Re: Tableau running slow
                    Mike Heenan

                    Agreed - but it seems like 18 seconds is too long for the line graph to load - and it's being compounded with the table tab calculations ( which are also if and statements). It's eased up a bit when I changed it away from an aggregate value and just added the average to the table. It's still slow though - and I need to add more similar calculations to this dashboard.

                    • 7. Re: Tableau running slow
                      Mihai Constantinescu

                      From my experience adding too many parameters (or filters) does have an impact on performance ... but I'll try have a look see if anything could be improved ...

                      • 8. Re: Tableau running slow
                        Jay Morehart

                        Other than making [A. Start Advantage] an integer parameter:

                        I can't think of anything really to boost the performance here. The issue is that you are trying to use a data program with out data Essentially you are using tableau as a calculator and feeding it 12 variables, it can do the calculations, but as that was not what it was designed for, it is not very efficient. If you had a data set of all the possible combinations of the 12 parameters (something around 100 trillion records) tableau would probably be able to calculate it quicker. Obviously this is not a great option. A math/statistical program like R would most likely handle these type of variable based calculations better. You may be able to use R-integration to leverage R's calculation capabilities and Tableau's viz capabilities.

                         

                        Hope this helps

                        • 9. Re: Tableau running slow
                          Mike Heenan

                          Thanks - unfortunately R doesn't work with Tableau Online which is how our visualizations are consumed .

                          • 10. Re: Tableau running slow
                            Tom W

                            Solution;

                             

                            Original compute / load time: 22 seconds

                            • Change 'A. Start Advantage' from a string to an integer parameter.
                              • It's quicker to reference a parameter of 0 or 1 versus having to do 'If parameter = "string" then 1 else 0."  Every calculation which then depends on Adv R1 would then need to make this calculation for basically no reason.
                            • Change the calculation for Adv R1 to be: [A. Start Advantage]
                              • This change alone bought me down to about 15 seconds
                            • Adv R2 through Adv R9
                              • Change the calculation to shorten the IF statement so instead of:
                            if [Adv R8] = 1 and [Score R8]  > 0 then 0 ELSEif
                            [Adv R8] = 1 and [Score R8] <= 0 then 1 elseif
                            [Adv R8] = 0 and [Score R8] >= 0 then 0 elseif
                            [Adv R8] = 0 and [Score R8] < 0 then 1 end
                            

                                      use

                            IF ([Adv R8] = 1 and [Score R8] > 0) or
                               ([Adv R8] = 0 and [Score R8] >= 0)
                            THEN 0
                            ELSE 1
                            END 
                            
                              • For what it's worth, I'm convinced you could do some math wizardry here using a combination of the MIN and MAX formula to cap it out at 1 or 0 and effectively just do a SUM. Something like [Adv R8] + MIN(0,Score R8) ... I know this doesn't work ,but I played with that for a little bit before giving up. I'm pretty confident this would be quicker than evaluating IF's.
                            • If you save at this point, close, re-open it should be effectively immediate to switch between calcs.
                            • R1 Prob
                              • Remove else null from the formula. It's not necessary.
                            • R2 Prob > R
                              • Change it to IF [Score R2] < 99 and........, remove else null as above

                             

                             

                            I've attached my solution in Tableau 10.3 (sorry, I don't have 10.1 anymore)

                            1 of 1 people found this helpful
                            • 11. Re: Tableau running slow
                              mortenbodaugaard.jrgensen

                              I saw this post from the OP on reddit as well.

                               

                              I agree with your statement that this is really something that any "calculator" tool like e.g. Excel would handle much more elegantly.

                              • 12. Re: Tableau running slow
                                Tom W

                                mortenbodaugaard.jrgensen wrote:

                                 

                                I saw this post from the OP on reddit as well.

                                 

                                I agree with your statement that this is really something that any "calculator" tool like e.g. Excel would handle much more elegantly.

                                I don't entirely agree with this. I got it running instantly and I think it's faster than Excel would be for the same thing. I'm not going to prove that point though by building this in Excel, I had a tough enough time reverse engineering it to make it more efficient!

                                1 of 1 people found this helpful
                                • 13. Re: Tableau running slow
                                  Mike Heenan

                                  Thanks Tom - this works great! Your help is much appreciated.