1 2 3 4 5 6 Previous Next 76 Replies Latest reply on Oct 23, 2019 1:59 AM by Diego Parker Go to original post
      • 30. Re: QT: Dynamically Switch Images Using Filter
        Jonathan Drummey

        I'd like to know that workaround, too! However, last I knew Lori Williams was no longer at Tableau. I'll try pinging Dustin Smith, he's got the history @ Tableau to maybe know something.


        The custom shapes are stored in the .twb in Base64 encoding, here's a post with some details: Extract Custom Shapes from a Tableau Workbook - Clearly and Simply


        I've run into some problems in the past when using really huge custom shapes (like unedited iPhone pics), Tableau's algorithms for resizing images using the Size Shelf & Size Slider can make pictures look a little weird (this was using 8.0 or maybe 7.0, so that might have gone away) as opposed to the much simpler icons. Coming from that experience, my suggestion is to crop & resize to make the images smaller. I don't know how many images you have, but even 718 1KB images still wouldn't add 1MB to a workbook.



        • 31. Re: QT: Dynamically Switch Images Using Filter
          Keith Helfrich

          Indeed, I've followed Jewel's approach by downloading 100 sample images in bulk from their URLs & aligning them alphabetically by name into a custom shape palette.  But the Pokemon approach is just fraught with problems.  It certainly doesn't scale.


          Some URLs are missing from the data, to be expected.  For those, I've changed my bulk download script to substitute in a missing image image, which keeps the alphabetical palette assignment 'aligned'.  But what happens tomorrow when new dimension values arise in the data ?  Relying on a simple alphabetical sort to map dimension values to custom shapes just guarantees that even a single new record in the database will throw everything off until the bulk image downloader is run to sync everything up again.


          Worse, these are the days of BIG data.  I don't have 718 pokemon, I have 54,000+ images to load.  What if Grainger or McMaster-Carr want to place a thumbnail into their dashboard next to each product in a top 20 winners & losers dashboard ?  Instead of 40 custom shapes, they'd be forced to load all of the many thousands of them into the custom palette, because you simply never know which of the products will appear in the dashboard.


          I'm curious to see whether Tableau's custom shapes can scale up, performance wise, to handle my 54,000+ images.  Even if it can, at 8kb each, we're still looking at a bloated .twbx file size of 422 Mb.


          My fingers are crossed that Dustin Smith replies to your inquiry with a magic bullet for the problem   !!


          Thanks, Jonathan! 


          Do let me know.

          Keith Helfrich | LinkedIn

          Keith Helfrich | Twitter

          • 32. Re: QT: Dynamically Switch Images Using Filter
            Andy Crellin



            I'm trying to do something slightly different (have a "Web Page" part refresh when a filter is changed - if you have any comments on that it would be great to hear them) but have been pointed in your directions as a possible work around.


            I can get the thing to work as you suggest, however it appears that Tableau is caching the images - so if the underlying image changes the only way to update the map background image is to refresh the data (which is far to heavy handed). Is there any way to tell Tableau to not cache the images and to load them from file each time the map is redrawn?





            • 33. Re: QT: Dynamically Switch Images Using Filter
              Shawn Wallwork

              Are you talking Desktop or Server?

              • 34. Re: QT: Dynamically Switch Images Using Filter
                Andy Crellin

                I'm currently trying to get this working in Desktop, but I need to be able to do this in Server longer term.

                • 35. Re: QT: Dynamically Switch Images Using Filter
                  Shawn Wallwork

                  Andy in Desktop the only way I know of to clear the cache is refresh the data (or hit the F5 key). In Server there are ways to setup automatic refresh.


                  And no I don't believe there's anyway to tell Tableau what to or not to cache.



                  • 36. Re: QT: Dynamically Switch Images Using Filter
                    Keith Helfrich

                    Hi everyone,


                    Coming back to this earlier thought to try and make Jewel's 718 Pokemon approach scale, I'm sorry to report that it doesn't scale all that well.


                    Here's what I've done:

                    1. Limited my data set to 10,000 possible marks that might require a custom shape (image).

                    2. Padded the names of those 10,000 images with leading zeros, so the alphanumeric sorting will align correctly.

                    3. Given it a go.


                    These are the problems I've identified:


                    1. FILTERING the canvas breaks everything

                    BOTTOM 10 SET on the filter shelf works OK: shapes are assigned to marks correctly

                    - both shapes & marks align, each alphanumerically sequencing from zero

                    TOP 10 SET on the filter shelf is broken: the last 10 marks are alphanumerically assigned the first ten shapes

                    - Shapes are assigned alphanumerically to the marks that are "in the view"

                    - The shapes always start alphanumerically from zero

                    - Jewel's view works ONLY because all 718 pokemon are in the vis

                    (no filtering)

                    So in addition to the various other work-arounds already required, any filtering will always need to be done with Table Calcs (which come last in the order of filtering operations).  And every view will always need to pull the entire data set, only to subsequently hide most of it from view again.

                    In my example above, if I want to render 10 marks with custom shapes accurately, I need to pull all 10,000 records from the database & hide 9,990 of them with a Table Calc filter.


                    2. Out of Memory Problems

                    Even with a BOTTOM 10 set on the filter shelf, with the first 10 marks rendered correctly, saving the workbook causes an out of memory error.  I’m guessing that, instead of only encoding ten of them, Tableau is trying to encode all 10,000 images into the .twb XML file with base64 encoding.  And some memory buffer along the way is stretched beyond capacity.


                    Jonathan, just curious, I don't suppose you've heard back from Dustin Smith about a secret work around for this idea ?

                    Dynamic Image as Row Header



                    Keith Helfrich | LinkedIn

                    Keith Helfrich | Twitter

                    • 37. Re: QT: Dynamically Switch Images Using Filter
                      Jonathan Drummey

                      Hi Keith,


                      Are your shapes assigned to a dimensions or a discrete measure? Because every time I've used a dimension Shape assignment, it has been invariant to filters. Discrete measures are a different case, though, Tableau can end up changing the assignments as the cardinality of the measure changes.


                      If you're using a dimension, I'd suggest sending this into support for that issue, and you could probably send it in anyways regarding the fail on save. Tableau likes to know where their software breaks.


                      Last I had word Dustin was trying to reach out to Lori, but he'd also asked around internally and nobody could think of anything. Andy Kriebel of FB says he's got something that might be appropriate that he'll be sharing at the Tableau Conference in September.



                      • 38. Re: QT: Dynamically Switch Images Using Filter
                        Keith Helfrich

                        Hi Jonathan,


                        I'm using a discrete dimension & the custom shapes assignment still break with filters.  I'll send a note to Tableau support.  I suspect this maybe because I'm still on version 8.0.3.


                        Maybe they can help me answer the memory problems with 10,000+ images, as well.



                        Keith Helfrich | LinkedIn

                        Keith Helfrich | Twitter

                        • 39. Re: QT: Dynamically Switch Images Using Filter
                          Jonathan Drummey

                          Definitely upgrade if you can, 8.1 had a bunch of specific performance-related work (mostly around parameters, quick filters, and workbooks with lots of calculated fields) that resulted in order-of-magnitude improvement in some workbooks.


                          Please post back here what you find out!



                          • 40. Re: QT: Dynamically Switch Images Using Filter
                            Keith Helfrich

                            Alas, I have my 8.2 beta tester's T-shirt .. but my employer is still working from the older version 8.0.2.  The out of memory problems are almost certainly due to the fact that version 8.0 runs 32-bit.


                            I've spoken to Tableau support about the assignment of custom shapes to a canvas where filters are applied.


                            Here's the skinny:


                            We found that if the shape palette is assigned first, to the unfiltered data, then the filters will keep the assigned custom shapes assignment as expected.  If the filter is assigned first, then Tableau Desktop will assign the shapes palette to only the fields on the view (post-filtering), beginning from the top of the shapes palette.  Tableau will only apply each shape to a distinct entry of each dimension member if the field is currently unfiltered when the custom shapes palette is applied.


                            The same behavior is also true of color assignments, as well.



                            Keith Helfrich | LinkedIn

                            Keith Helfrich | Twitter

                            • 41. Re: QT: Dynamically Switch Images Using Filter
                              Jonathan Drummey

                              I'm sorry you have to stay on 8.0. (I'm on 8.1, but my work box is Windows XP, so I'm still not 64 bit and occasionally run into memory problems).


                              Thanks for posting the info you got from support, that makes total sense given what I've seen and is a pretty clear explanation.



                              • 42. Re: QT: Dynamically Switch Images Using Filter
                                Allison Brown

                                Thank you! I have been collapsing boxes with different sheets this whole time

                                • 43. Re: QT: Dynamically Switch Images Using Filter
                                  Shawn Wallwork

                                  So sorry you didn't find it earlier; but also glad you finally did.





                                  • 44. Re: QT: Dynamically Switch Images Using Filter
                                    Bala Deshpande

                                    Have a related question. I have two datasets which are blended on one of the fields (SKU in this case). Created a worksheet where i can select the image file corresponding to the SKU (just like the original post where images are linked to coffee/tea names). I can pull this into a dashboard and it works fine.


                                    However what i want to do is add the other view from the non-image dataset which shows sales by region. So in my final dashboard i want the user to select a SKU and both views (sales by region and image) updated/filtered. For some reason i am not able to get this combined view dashboard to work.


                                    Unfortunately i cannot share the data. To help people understand the situation i have taken Shawn's workbook and added a sales by region data to the dashboard and it works fine. I am wondering what the issue is with my data? Perhaps it does not work with blended data?