6 Replies Latest reply on Jul 23, 2018 12:42 PM by Don Wise

    Data Blending

    Ryan  Gladfelter

           Hello, I'm rather new to tableau.  I'm working on a report focusing on workplace utilization and I'm a little stuck.  The main dataset has date, check-in, employee id, etc.  It always has one row per date (0 or 1 for check-in).  The secondary set I blended in was the door swipe system.  It has employee id, date, door, etc. It counts multiple doors throughout the day so there are usually multiple records. 

       

          Right now, I have it blended with check-in dataset as primary.  I use the sum of number of records of secondary to show swiping in. I use the check-in on primary to show that.  The original idea is to count the days where a person checked in, but didn't swipe or didn't check in, but swiped then have by each user.  I was able to do it by filtering the view, but this was on the each day basic.  I would like to be able to from a monthly view, but when I drill back up to month, the numbers are additive. Plus the number of swipes just add up, and don't really have any meaning when all combined. 

       

      I wish I could share the workbook.

       

      Maybe i need a filter or something.

       

      If you could point me in the right direction that would be great. 

        • 1. Re: Data Blending
          Heqing Huang

          Hi Ryan,

           

          Hope I get your question right. One possible solution is to create a dimension, and count the dimension to see the days where "a person checked in, but didn't swipe or didn't check in, but swiped then have by each user."

           

          For example,

          IF "Checked In" =1 THEN

               IF " Swiped"

                    THEN "Checked In and Swiped"

                    ELSE "Checked In but not Swiped"

               END

               Else

                    NULL

          END

           

          In your actual view, you can count the specific calculated field for monthly view. Since the null would not be counted and the Checked In is the primary data source, you should be able to get the monthly view. Hope it help!

           

          Heqing

              

          • 2. Re: Data Blending
            Don Wise

            Hi Ryan,

            I realize you probably cannot pass security related data on a public forum so I dummied up some data to mimic your situation.  Personally I'm not a fan of Data Blending unless used as a last resort. In the attached example (2018.1 version) workbook, I did a LEFT JOIN on Employee Id between two worksheets (1) Your sample primary for check-in (2) Door Swipes captured throughout a period of time, inclusive of capturing LL333 who did check-in but didn't swipe on two occasions.

             

            Please look at the JOIN in the Data Pane window.  I think Data Blending is probably complicating the issue.  Tableau is great at passing the data through, but it gets complicated when you're trying to do calculations or LOD's thereafter.  Hope this helps? If so, please mark this response as correct. Thx, Don

             

            Screen Shot 2018-07-23 at 11.23.40 AM.png

            Screen Shot 2018-07-23 at 11.23.46 AM.png

            Screen Shot 2018-07-23 at 11.23.50 AM.png

            Screen Shot 2018-07-23 at 11.25.00 AM.png

            1 of 1 people found this helpful
            • 3. Re: Data Blending
              Ryan  Gladfelter

              This helps Don, Thanks.

              One question.  I'd like to keep it to one record per person per day. Right now its as many of swipe in they have.  Is there a filter I could add?

              • 4. Re: Data Blending
                Don Wise

                Hi Ryan,

                You could do a COUNTD of their Employee ID from the secondary table, like the below, if that's what you're looking for?

                Screen Shot 2018-07-23 at 12.36.40 PM.png

                1 of 1 people found this helpful
                • 5. Re: Data Blending
                  Ryan  Gladfelter

                  Dude, thanks so much. I appreciate it!

                  • 6. Re: Data Blending
                    Don Wise

                    No worries - glad to help!