A client wants to see data for only the last day in a dataset and the last day is always yesterday. The date is represented with the field Ship Date.
The client is not concerned about the daily refresh results. The volume of data is so large that performance is their priority. In the future, the client will be able
to move the calculation to the underlying database, but not at this time.
The solution should offer the best performance.
Which approach should the consultant use to produce the desired results?
The best approach to ensure performance while providing data for only the last day (yesterday) in the dataset is to use a calculated field that filters the data to include only yesterday's date:
Filter on calculation [Ship Date]=TODAY()-1: This calculated field dynamically computes yesterday's date by subtracting one day from today's date. This approach ensures that each day, only the data for the previous day is loaded, which keeps the volume of data minimal and improves performance.
Dynamic Date Calculation: The use of TODAY()-1 ensures the filter remains up-to-date with the changing dates, without the need for manual updates, providing accuracy and timeliness in the dashboard.
This approach is efficient because it avoids the overhead of processing the entire dataset and focuses only on the relevant day's data. It also aligns with Tableau's capabilities for creating dynamic filters using date functions, as highlighted in the Tableau help documentation on date calculations and filters.
Reference This solution utilizes Tableau's built-in date functions and dynamic calculations to optimize performance, as recommended in Tableau's performance optimization resources and date calculation guidelines.
A client requests a published Tableau data source that is connected to SQL Server. The client needs to leverage the multiple tables option to create an
extract. The extract will include partial data from the SQL Server data source.
Which action will reduce the amount of data in the extract?
Using an extract filter is an effective way to reduce the amount of data in a Tableau extract. Extract filters allow you to specify a subset of the data to include, which can significantly decrease the size of the extract by excluding unnecessary data. This is particularly useful when you only need partial data from a larger SQL Server data source.
When dealing with large datasets in SQL Server and needing to create a manageable extract in Tableau, using an extract filter is the most direct and effective method to limit the data included:
Extract Filter: This involves setting filters that apply directly when the data is extracted from the source. This means that only the data meeting the specified criteria will be extracted and loaded into Tableau, significantly reducing the size of the extract.
To apply an extract filter, in the Data Source page in Tableau, drag the fields you want to filter by to the Filters shelf. Then, configure the desired filter criteria. When you create the extract, choose the option to 'Add Filters to Extract' and select the configured filters. This ensures that only the data that meets these conditions is extracted from the SQL Server.
This approach not only minimizes the data volume but also speeds up performance in Tableau because it processes a smaller subset of the full dataset.
Reference This procedure is described in detail in Tableau's help documentation on managing extracts and optimizing performance by using extract filters, which is recommended for scenarios involving large datasets or when specific subsets of data are required for analysis.
A client has a database that stores widget inventory by day and it is updated on a nonstandard schedule as shown below.
They want a data visualization that shows widget inventory daily, however their business unit does not have the ability to modify the data warehouse
structure.
What should the client do to achieve the desired result?
For a client who needs a daily visualization of widget inventory but cannot modify the data warehouse structure, the best approach is to use Tableau Prep to add new rows. Tableau Prep can be used to manipulate the existing dataset by adding missing date entries and appropriately adjusting inventory counts based on available data. This allows the creation of a complete daily snapshot for visualization without needing changes to the underlying database structure.
Refer to the exhibit.
From the desktop, open the NYC
Property Transactions workbook.
You need to record the performance of
the Property Transactions dashboard in
the NYC Property Transactions.twbx
workbook. Ensure that you start the
recording as soon as you open the
workbook. Open the Property
Transactions dashboard, reset the filters
on the dashboard to show all values, and
stop the recording. Save the recording in
C:\CC\Data\.
Create a new worksheet in the
performance recording. In the worksheet,
create a bar chart to show the elapsed
time of each command name by
worksheet, to show how each sheet in
the Property Transactions dashboard
contributes to the overall load time.
From the File menu in Tableau Desktop,
click Save. Save the performance
recording in C:\CC\Data\.
To record the performance of the Property Transactions dashboard in the NYC Property Transactions.twbx workbook and analyze it using a bar chart, follow these detailed steps:
Open the NYC Property Transactions Workbook:
From the desktop, double-click the NYC Property Transactions.twbx workbook to open it in Tableau Desktop.
Start Performance Recording:
Before doing anything else, navigate to the 'Help' menu in Tableau Desktop.
Select 'Settings and Performance', then choose 'Start Performance Recording'.
Open the Property Transactions Dashboard and Reset Filters:
Navigate to the Property Transactions dashboard within the workbook.
Reset all filters to show all values. This usually involves selecting the dropdown on each filter and choosing 'All' or using a 'Reset' button if available.
Stop the Performance Recording:
Go back to the 'Help' menu.
Choose 'Settings and Performance', then select 'Stop Performance Recording'.
Tableau will automatically open a new tab displaying the performance recording results.
Save the Performance Recording:
In the performance recording results tab, go to the 'File' menu.
Click 'Save As' and navigate to the C:\CC\Data\ directory.
Save the file, ensuring it is stored in the desired location.
Create a New Worksheet for Performance Analysis:
Return to the NYC Property Transactions workbook and create a new worksheet by clicking on the 'New Worksheet' icon.
Drag the 'Command Name' field to the Columns shelf.
Drag the 'Elapsed Time' field to the Rows shelf.
Ensure that the 'Worksheet' field is also included in the analysis to break down the time by individual sheets within the dashboard.
Choose 'Bar Chart' from the 'Show Me' options to display the data as a bar chart.
Customize and Finalize the Bar Chart:
Adjust the axes and labels to clearly display the information.
Format the chart to enhance readability, applying color coding or sorting as needed to emphasize sheets with longer load times.
Save Your Work:
Once the new worksheet and the performance recording are complete, ensure all work is saved.
Navigate to the 'File' menu and click 'Save', confirming that changes are stored in the workbook.
Tableau Help Documentation: Provides guidance on how to start and stop performance recordings and analyze them.
Tableau Visualization Techniques: Offers tips on creating effective bar charts for performance data.
By following these steps, you have successfully recorded and analyzed the performance of the Property Transactions dashboard, providing valuable insights into how each component of the dashboard contributes to the overall load time. This analysis is crucial for optimizing dashboard performance and ensuring efficient data visualization.
Topic 3, Knowledge-Based Section B
An online sales company has a table data source that contains Order Date. Products ship on the first day of each month for all orders from the previous month.
The consultant needs to know the average number of days that a customer must wait before a product is shipped.
Which calculation should the consultant use?
The correct calculation to determine the average number of days a customer must wait before a product is shipped is to first find the shipping date, which is the first day of the following month after the order date. This is done using DATETRUNC('month', DATEADD('month', 1, [Order Date])). Then, the average difference in days between the order date and the shipping date is calculated using AVG(DATEDIFF('day', [Order Date], [Calc1])). This approach ensures that the average wait time is calculated in days, which is the most precise measure for this scenario.
To calculate the average waiting days from order placement to shipping, where shipping occurs on the first day of the following month:
Calculate Shipping Date (Calc1): Use the DATEADD function to add one month to the order date, then apply DATETRUNC to truncate this date to the first day of that month. This represents the shipping date for each order.
Calculate Average Wait Time (Calc2): Use DATEDIFF to calculate the difference in days between the original order date and the calculated shipping date (Calc1). Then, use AVG to average these differences across all orders, giving the average number of days customers wait before their products are shipped.
Date Functions in Tableau: Functions like DATEADD, DATETRUNC, and DATEDIFF are used to manipulate and calculate differences between dates, crucial for creating metrics that depend on time intervals, such as customer wait times in this scenario.