3 Replies Latest reply on Nov 24, 2013 4:57 PM by Shawn Wallwork

    Any fix for this problem? My Sets Work Until my .tbw file is closed and then reopened

    Bruce Segal

      Hi folks:

       

      I have several questions related to using Sets in Tableau. I'm using ver 8.1.0

       

      Data Summary:

      I have data for cab rides that's granular by ride by day, by time of day, by pickup addr and by destination address. I group all Pickup and Destination addr into 4 categories: Office, Airport, Train, & Other TBD

       

      Goal:

      I want to group all rides together that meet all of these criteria: 1. Leave from an office addr, and 2. go to an address that's "other TBD" and 3. during a weekday, and 4. between the hours of 5p to 10p. All other combinations of these criteria are grouped together.

       

      Problem Summary

      1. I created a set, that works fine until I close my workbook and re-open it. When it works I have a set with a domain = 1. When I reopen the file the domain = 0. I can fix it by adding the missing part back, but the problem repeats itself. I'd like help diagnosing the problem so I can understand it.

      2. I found a work around using several custom calcs that combine the sets with custom text calcs. However, in creating that calc I found some unexpected behaviors, that I'd like to under stand.

      3. Finally, I'd like to determine if there's a better way to achieve what I'm after.

       

      Detail Prob

      Q1. This set works and then disappears. Here's a screen shot of what the set looks like when I create it. I've opened a dialog box to show the domains b/c this is what I can see changes. I've highlighted the relevant parts.

       

      Here's a screen shot of the set when it fails, which happens when I save the workbook and then reopen it. The difference is what was formerly defined as the set - 1 combination of all 4 criteria - magically disappeared leaving a domain of 0. I'd like to understand why?

       

       

       

      Q2. I created a custom calc that solves the problem. However, I'm not sure it's the most efficient solution. And I encountered some issues in creating it that make me want to understand what's happening under the hood.

       

      This custom dimension calc works

      Calc Name: In / Out of Policy

      [1 PickUp Addr Type] == "Office"

      // above field is custom dimension calc

      AND

      [2 Destination Addr Type] == "Consol Addr TBD"

      // above field is custom dimension calc.

      AND [Week Days]

      // above field is a set where Weekdays are In the set & thus = the domain. The set is based on a custom date calc

      AND [Time 5-9:59p Y/N]

      // above field is a set where the Hours 5-9p are In the set & thus = the domain. The set is based on a custom calc that groups all minutes into hours so 5p to 9p = 5p to 9:59p

       

      I attach a screen shot that shows how this works correctly. My question is how come the following version of the calc didn't work correctly? The first two lines are identical to the calc above. The only change is the 3d line where I instead of using a set that includes all weekdays, I use a custom date dimension [Date of Voucher (Weekdays)] and exclude Sat & Sunday.

       

      [1 PickUp Addr Type] == "Office"

      AND

      [2 Destination Addr Type] == "Consol Addr TBD"

      AND  Str ([Date of Voucher (Weekdays)]) <> "1" Or  Str ([Date of Voucher (Weekdays)]) <> "7"

      // for calc above 1 = Sunday & 7 == Saturday

       

      When I use this calc, as seen in the screen shot it seems to expand the criteria I started with above. So, this suggests I don't understand how the calc works and how sets work. And that's what I'm trying to understand better. (Btw, I recognize I left out a line for the time range but this is what causes the difference.)

       

      Q3. Lastly, I'd like to know if perhaps I should try to accomplish the goal set out at the top, some way other than what I've done in step 2? Is using a combo of helper calcs, and sets less efficient or more prone to crashing than some other solution. I ask this b/c I've been getting a very odd error with this workbook that I've never seen in the 5 or 6 years of using Tableau. The error message is "DataValue::MakeSpecial: bad argument." It's led to a total failure one a workbook and I don't know if it's related to the complexity of the set I'm trying to define.