![]() Instead, data blending is a better method. If we were to join this data, some quota information would be duplicated for each transaction because joins are row-level. For example, you have transactional data in one source and quota data in another. “This is ideal when the data is at different levels of granularity. “Unlike joins, data blending keeps the data sources separate and simply displays their information together,” Tableau explains. This is a bit different from data joining, which involves combining related data from common fields. When blending data, you merge data from a secondary data source and display it alongside data from a primary data source in a view (i.e., a visualization). Once the timesheet data is at the pay period level, you can join it to the Hours Wanted data source by Pay Period and Employee.Īs a last step, clean up any redundant fields that aren’t needed and use an Output step to export the data.Occasionally when working in Tableau, you will have to perform a function called data blending, which involves combining data from different sources. In this case, aggregate to the pay period level (the highest level in the data) by adding an Aggregate step in Tableau Prep. Since the data sources are at two different levels, some sort of aggregation needs to be done so the timesheet and hours wanted are in alignment. Next, create a calculated field that computes the number of hours between the newly created Clock In Date/Time and the Clock Out Date/Time fields.Ĭlean up any redundant fields to remove any clutter from the data. Here’s how the Clock In Date/Time calculated field looks you would also need to complete this step for the column. So far, the date field, clock_in, and clock_out times are in separate columns.Ĭreate two datetime columns in order to calculate the number of hours worked on each day (Clock In Date/Time and Clock Out Date/Time). Some adjusting needs to be done with the dates and times which can be done by clicking the ellipsis on a field’s card from the Profile pane and choosing “Create Calculated Field”. ![]() ![]() ![]() This join will bring the Pay Period numbers into the Timesheet data. Next, use a Join step to join the Timesheet data source to the calendar scaffold on Date. Open Tableau Prep and use two Input steps to bring in the Timesheet and Calendar Scaffold data sources. To account for the two different date levels, create a third data source that provides a crosswalk or lookup for each day and pay period.Ĭalendar scaffold – lists every day of the year and the associated pay period. Since these data sources are at two different levels, there needs be a way to figure out what days belong in each pay period. Timesheets are recorded daily, and hours wanted is recorded by pay period. The main problem in this data is that the timesheet data and hours wanted data are at two different levels. Hours Wanted – lists each employee with the number of hours they would like to work or are available to work (by pay period). Timesheets – lists each employee and the date and times they clocked in or out. In most cases there are two main data sources that will be needed for this. Employers want to know how often their employees are working and how that compares to the number of hours they want to work, or the number of hours they have available. This image will also be a helpful reference to see which Tableau Prep steps (Input, Join, Clean, Aggregate, Output) are required to prepare data at different levels of aggregation.Ī common business need is analyzing employee utilization and time. Using Tableau Prep to analyze employee capacity and utilizationīy the end of this post, you will be able to recreate the following flow in Tableau Prep which combines timesheet data at an hourly level and capacity data at a pay period level. The “scaffolding” and join techniques shared in this post will be helpful any time you need to combine data sources at different levels for your analysis. ![]() One of infinite use cases you can solve on your own in Tableau Prep is preparing a data source to analyze employee utilization, even when the numerator and denominator for the formula are at different aggregations. Combining Tableau Prep with Tableau Desktop makes it possible for you to be a self-sufficient, end-to-end analyst from data engineering to dashboard development. If you’ve been following the Tableau Desktop tutorials here at Playfair Data, it is likely that you also have a license to Tableau Prep Builder (just ask your license administrator to provide the activation key). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |