14 Replies Latest reply on Jun 24, 2011 5:31 PM by Richard Leeke

    Change in Date Handling?

    . omomyid

      In many of my extracts I'm returning the most recent date via a window function so that it's reported for all rows. I'm using it for many different things but one of them is to show the most recent date in the data view worksheet titles etc. Historically, I've done this by placing the most recent date dimension in the level of detail shelf as a discrete dimension.


      In upgrading to 6.1 this changed the value displayed from the actual value to 'All'. I was able to resolve the problem by changing the dimension to Continuous.


      Is this a change in handling or is something else happening?

        • 1. Re: Change in Date Handling?
          James Baker

          I'm not sure, but this is worthy of a bump... a repro sample workbook (made in 6.0, that shows this behavior in 6.1) would be helpful.

          • 2. Re: Change in Date Handling?
            Richard Leeke

            Yes, I'm seeing this too.  It's not limited to extracts and it's not limited to window calcs.


            Here are two versions of a sample workbook which make it pretty clear.  The data source has one row, one column, name [X], value "X".


            Surely the smallest sample workbooks ever posted.  ;-)


            This would break lots of things.

            • 3. Re: Change in Date Handling?
              Richard Leeke

              Following a posting on the "Wouldn't It Be Nice If" forum I had another look to see how this is working in beta 2.  It definitely breaks a lot of things for me.


              Take a look at the four screenshots attached.  This is a viz I did showing New Zealand earthquakes, which is up in the Public gallery, here.  I built quite a lot of information into the titles of a couple of the views, as you can see in the 6.0 versions - one with no search criteria entered and one zoomed in on Christchurch.  The 6.1 versions replace the text in the headers of both the postcode finder and the main earthquake sheets with the text "All".


              The text "All" appears to indicate that a field used in the view title is not on the filter shelf, or has "Use All" selected.  On the other hand, explicitly selecting all values lists the values.


              There are a couple of aspects of the way that I have used fields in view titles which no longer work.  I'm conscious that I have been pushing the limits a bit with some of this, so it may not be reasonable to expect 100% backward compatibility - but I think it is worth just spelling out exactly what I have done here.  I'm sure lots of people have used at least one of these techniques - I'm fairly certain I got at least one of them from the forum (probably from Joe or Andy).


              The small "Postcode Finder" view allows the user to zoom in on an area containing all post code locations which contain the text entered in the adjacent text parameter.  If no search text has been entered it shows the whole country.  If search text matching one or more location names is entered the map zooms to enclose those locations and if no place names match an empty view is displayed.


              I use the view title bar to describe the context for that view.  It can take 3 values:


              "All NZ Postcode Locations"

              "Postcodes for Locations matching 'xxx'"

              "<No Matching Postcode Locations found>"


              I constructed the whole text of either of the first two messages in a calculated field, based on whether or not the user had entered a search term in the search parameter.  The view title contains only a reference to that calculated field, no other text.


              The third message relies on a quirk of view behaviour in 6.0.  If the view contains no rows at all - any field references display as the name of the field itself, enclosed in <>.  So the only way I could find to display that last message was to make the text the name of the field.


              So I really think it's worth exploring everything that's going to break as a result of this.

              • 4. Re: Change in Date Handling?
                Andy Cotgreave

                Oh no! This is going to be a right pain in the ****. I've been using this technique in loads of places.

                • 5. Re: Change in Date Handling?
                  Joe Mako

                  This feels like it went from something we could control to something we cannot control.


                  Here is another example workbook where you can see the effect 6.1 has on calculated fields in the Title area:

                  The specified item was not found.


                  In the calculated field, I am detecting when there is more than one value in the returned data, and setting the text to be displayed. In 6.0, this behaves as expected, but in 6.1, the value displayed in the Title is always "All". This "All" is not coming from my calculated field formula, but seems to be happening afterwards, it seems like Tableau is looking at the filter shelf, and if the field is not on the filter shelf with value manually selected to keep only, then "All" will be displayed (plus lots more logic to handle other situations).


                  Additionally, the behavior is different with a multi-select Exclude filter with the "All" option enabled. Un-checking each has different results than just selecting "All" in the quick filter. Of note, All/None behavior is different in the Edit Filter dialog for an Exclude filter than selecting All in an Exclude quick filter. The "All" button means none kept in the dialog, and the "All" option means all kept in the quick filter. Upon more testing I see the same thing for inclusive multi-select, if I select each individually, I get a list of values, but I I select All, then "All" is displayed. So what we end up with is two ways to set the filter to the same result in data returned, but the display in the Title will be different based on the method of selection used.


                  So long story short, I am unable to accurately predict what is going to happen, and different things happen depending on the way things were selected, but the more I think about it, the more I think there is something subtly interesting going on here where Tableau is trying to make the best choice it can.


                  Another situation I discovered while looking into this is a parameter must be specified/set/edited in addition to initial creation in order to be displayed in the Title.


                  I think it would be beneficial if there was an additional pre-check before replacing the text displayed with "All". The additional pre-check could be something like:

                  If the max value is equal to the min value, then display value, otherwise perform 6.1 behavior logic.

                  • 6. Re: Change in Date Handling?
                    James Baker

                    Gathering data internally...

                    • 7. Re: Change in Date Handling?
                      James Baker

                      Ok folks, here's a proposal for a fix:  If the domain of the field is one, then we'll show that value and not "All".  Andy, Joe, Richard, how does that sound?


                      We're going to leave the "All" text in for multi-member domains (instead of "A, B, and 48 more..."), but this should leave alone any calculations that are designed to produce one specific bit of text.  When there's only one thing, "All" is slightly deceptive anyway.  So we'll print the one value - whether it's a normal data value or a piece of text produced by a calculated field.

                      • 8. Re: Change in Date Handling?
                        Joe Mako

                        James, that sounds great, just as I would expect it to behave.


                        In regards to the other situation I pointed out, selecting each in a multi-select vs just clicking the All option, results in a different display. Is this expected to behave differently when selecting All vs effectively selecting All by selecting each in a quick filter (and/or filter dialog)?

                        • 9. Re: Change in Date Handling?
                          Andy Cotgreave

                          I don't have anything to look at directly to hand, but your description sounds good, James.

                          • 10. Re: Change in Date Handling?
                            Richard Leeke

                            Sounds good James.


                            Can you just confirm a couple of other points about the behaviour changes?


                            1) Will the [list of values] displayed revert to  6.0 behaviour (based on the domain) or retain the current 6.1 beta behaviour (based on the filter selection).  I can see that making quite a difference to the meaning in some cases. 


                            For example: create a view with Coffee Chain.  Drop Market on Rows and include it in the view title.  Drop product on Filters and select just Cafe Latte.  6.0 says "South and West", 6.1 says "All".


                            I don't have a preference - I just want to know if I need to keep my eyes open for behaviour changes in old workbooks.


                            2) What will display in the case where there are no rows returned by the view?


                            6.0 behaviour is to replace the field value (or list of values) with the name of the field - which can leave the view looking a bit odd, and is the reason I came up with that ugly bodge of creating a calculated field where the field name is the message you want to display if there are no rows.


                            In 6.1 beta 3 I see that what is displayed depends on the reason for there being no rows returned.  If there is a filter on the field that is in the Title, and no values are selected in the filter, it displays "None".  If there are values selected for the filter but no rows are returned due to other filter criteria it displays either the list of selected values for that field's filter, or "All", as appropriate.



                            I'm not lobbying for retaining the old behaviour, just keen to understand whether the new behaviour is going to allow sensible handling of the various cases.  I think it's clear that those of us who have exploited some of the quirks of 6.0 behaviour should expect to need to revisit any views using those tricks.

                            • 11. Re: Change in Date Handling?
                              James Baker

                              Joe, yes there's a difference between "All mode" and "having checked all checkboxes".  (This mode difference is reflected in the Filter dialog, but is invisible when looking at the quickfilter.)  When new data comes in, "All mode" includes it but "select from list" does not, even if all things are checked.  Clicking on the "(All)" item sets All mode, while checking the last item itself leaves the filter in "select from list" mode.


                              Richard, the 6.1 behavior for #1 is standing firm at this time.


                              For #2, it displays "None". ... oh, except is says "All" if there's no data for other reasons, as you say.  Well... I guess that still makes sense.  It's showing "All" that it can, and if some become available they will show.  Hmm.


                              So, yes, we made the fix I referred to above but no other changes from beta3.  And you have correctly understood the beta3 behavior as far as I can tell.

                              • 12. Re: Change in Date Handling?
                                Richard Leeke

                                Thanks James.


                                I suspect there would still be the odd quirk or corner case that someone will be unhappy with at some point whatever you did - but the 6.1 behaviour as you've described it certainly sounds better than 6.0, and the fix definitely addresses the main issue with the beta.


                                I'll definitely have to have a play with some of my old workbooks to see if they need some tweaks once I get it - it's really hard to visualise all the corner-cases without trying it - but I don't foresee too many issues.

                                • 13. Re: Change in Date Handling?
                                  Joe Mako

                                  Thank you the great explanation James. That matches may experience, and the reasoning makes perfect sense. This is another case of Tableau doing the best thing possible. Thank you.

                                  • 14. Re: Change in Date Handling?
                                    Richard Leeke

                                    That distinction between "All mode" and "All you can see at the moment" is very useful to understand, James, thank you for that.  Although I'd seen it happen lots of times it had never really sunk in for me that that was what was happening.


                                    The fact that the difference isn't exposed via the quick filter can actually lead to some confusion.  I think there's a strong argument for presenting some sort of visual clue in the quick filter.  Currently, just looking at the state of the U/I is not enough to predict the behaviour - you need to know how the filter got into that state.  That's not even good on your own workbook (especially with an ageing memory) -  and ir certainly isn't good for collaborative working.  Probably a small point, though.


                                    Incidentally, this behaviour turns out to play a part in the mystery described in this thread.  It's extra confusing in that case because a filter doesn't include an entry for the special "multiple values" indicator ('*') - so the only way to see those entries is to check (All).  I might describe that issue properly in another thread tomorrow, if I remember.