IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 游戏开发 -> tb7_Story points_Dashboards_Context filter_Set action/calculation_parameter_Blank Object_one Country -> 正文阅读

[游戏开发]tb7_Story points_Dashboards_Context filter_Set action/calculation_parameter_Blank Object_one Country

? ? ?In data discovery and analysis, you will likely create numerous data visualizations. Each of these visualizations gives you a snapshot of a story within the data. Each insight into the data answers a question or two. At times, the discovery and analysis phase is enough for you to make a key decision and the cycle is complete. In other cases, you will need to bring the snapshots together to communicate a complete and compelling[k?m?pel??]令人信服的,有说服力的;引人入胜的 story to your intended audience.

? ? ?Tableau allows you to bring together related data visualizations into a single dashboard. This dashboard could be a static view of various aspects of the data or a fully interactive environment, allowing users to dynamically filter, drill down, and interact with the data visualizations.

? ? ?In this chapter, we'll take a look at most of these concepts within the context of several in-depth examples, where we'll walk through the dashboard design process, step by step. Like before, don't worry about memorizing lists of instructions. Instead, focus on understanding why and how the components and aspects of dashboards work.

This chapter will cover the following topics:

  • Introduction to dashboards
  • Examples of dashboards
  • Interactivity with actions
  • Designing for different displays
  • Story points

? ? ?For the examples in this chapter, we'll return to the Superstore Sales sample data we used in the previous chapters. Go ahead and create a new workbook with a connection to that dataset.

Key concepts for dashboards

? ? ?Before diving into some practical examples, let's take some time to understand what a dashboard is and why you might create one.

Dashboard definition

? ? ?From a Tableau perspective, a dashboard is an arrangement of individual visualizations, along with other components such as legends, filters, parameters, text, containers, images, extensions, buttons, and web objects that are arranged on a single canvas. Ideally, the visualizations and components should work together to tell a complete and compelling data story. Dashboards are usually (but not always) interactive.

Dashboard objectives

? ? ?The primary objective of a dashboard is to communicate data to a certain audience with an intended result. Often, we'll talk about telling the data story. That is, there is a narrative (or multiple narratives) contained within the data that can be communicated to others.

? ? ?While you can tell a data story with a single visualization or even a series of complex dashboards, a single Tableau dashboard is the most common way to communicate a single story. Each dashboard seeks to tell a story by giving a clear picture of certain information. Before framing the story, you should understand what story the data tells. How you tell the story will depend on numerous factors, such as your audience, the way the audience will access the dashboard, and what response you want to elicit[??l?s?t]引出,<古>使(潜在的东西)显现,诱出 from your audience.

? ? ?Stephen Few, one of the leading experts in the field of data visualization, defines a dashboard as a visual display of the most important information that's needed to achieve one or more objectives, consolidated[k?n?sɑ?l?de?t?d]统一的,整理过的,合并 and arranged on a single screen so the information can be monitored at a glance. This definition is helpful to consider because it places some key boundaries around the data story and the way we will seek to tell it in Tableau. In general, your data story should follow these guidelines:

  • The data story should focus on the most important information. Anything that does not communicate or support the main story should be excluded. You may wish to include that information in other dashboards.
  • The data story that you tell must meet your key objectives. Your objectives may range from giving information to providing an interface for further exploration, to prompting your audience to take action or make key decisions. Anything that doesn't support your objectives should be reserved for other dashboards.
  • The data story should be easily accessible and the main idea should be clear. Depending on your audience, you may wish to explicitly state your conclusions from the data or you may want to guide your audience so that they can draw their own.

? ? ?When you set out to build a dashboard, you'll want to carefully consider your objectives. Your discovery and analysis should have uncovered various insights into the data and its story. Now, it's your responsibility to package that discovery and analysis into a meaningful communication of the story to your particular audience in a way that meets your objectives and their needs.

Dashboard approaches

? ? ?There are numerous possible approaches to building dashboards based on your objectives. The following is by no means a comprehensive list:

  • Guided analysis: You've done the analysis, made the discoveries, and thus have a deep understanding of the implications of the data story. Often, it can be helpful to design a dashboard that guides your audience through a similar process of making the discoveries for themselves, so the need to act is clear.

    ? ? ?For example, you may have discovered wasteful spending in the marketing department您可能在营销部门发现了浪费性支出, but the finance team may not be ready to accept your results unless they can see how the data led you to that conclusion但财务团队可能还没有准备好接受您的结果,除非他们能够看到数据如何使您得出该结论.
  • Exploratory: Many times, you do not know what story the data will tell when the data is refreshed in the next hour, next week, or next year. What may not be a significant aspect of the story today might be a major decision point in the future. In these cases, your goal is to provide your audience with an analytical tool that gives them the ability to explore and interact with various aspects of the data on their own.

    ? ? ?For example, today, customer satisfaction is high across all regions. However, your dashboard needs to give the marketing team the ability to
    continually track satisfaction over time
    ,
    dynamically filter by product and price,
    and observe any correlations with factors such as quality and delivery time.
  • Scorecard/Status snapshot: There may be a wide agreement on Key Performance Indicators (KPIs)关键绩效指标 (KPI) or metrics指示 that indicate good versus poor performance. You don't need to guide the audience through discovery or force them to explore. They just need a top-level summary and sufficient detail and drill down to quickly find and fix problems and reward success.

    ? ? ?For example, you may have a dashboard that simply shows how many support tickets are still unresolved. The manager can pull up the dashboard on a mobile device and immediately take action if necessary.
  • Narrative: This type of dashboard emphasizes a story. There may be aspects of exploration, guided analysis, or performance indication, but primarily you are telling a single story from the data.

    ? ?? For example, you may desire to tell the story of the outbreak of a disease, including where, when, and how it spread. Your dashboard tells the story, using the data in a visual way.

? ? ?We'll take a look at several in-depth examples to better understand a few of these different approaches. Along the way, we'll incorporate many of the skills we've covered in previous chapters and we'll introduce key aspects of designing dashboards in Tableau.

Tip

? ? ?Your dashboard may have a hybrid approach. For example, you might have an exploratory dashboard that prominently displays some KPIs. However, be careful to not overload过载 a dashboard. Trying to meet more than one or two objectives with any single dashboard will likely result in an overwhelming mess.

Designing dashboards in Tableau

? ? ?No matter your objective or approach, the practical task of designing a dashboard in Tableau will look similar each time. In this section, we will go through some fundamental concepts.

Objects

? ? ?Dashboards are made up of objects that are arranged on a canvas. You'll see a list of objects that can be added to a dashboard in the left-hand pane of a dashboard:

?The pane includes these objects:

  • Horizontal: A layout container within which other objects will be arranged in a single row (horizontally).
  • Vertical: A layout container within which other objects will be arranged in a single column (vertically).
  • Text: An object that allows you to include richly formatted text in your dashboard.
  • Image: An image (for example, . gif , . png , . jpeg ) that can be positioned and sized on your dashboard. Optionally, you may set a URL for navigation when a user clicks the image.
  • Web Page: An object that allows you to embed web content in the dashboard. You may set the URL at design time. We'll also consider how to use actions to dynamically change the URL.
  • Blank: A blank object that can be used as a placeholder or to provide spacing options.
  • Button: Provides a means of navigation to other dashboards and sheets in the workbook.
  • Extension: One of a growing number of tools developed by Tableau, third parties, (or maybe even you!) that leverages the extensions API to provide extended functionality to dashboards. This could allow you to accomplish things such as gather extensive usage data, dynamically update parameters, incorporating visualizations from other platforms (such as D3), and much more!

? ? ?In addition to the objects that you can add through the sidebar, there are other objects that may be applicable to a given dashboard:?

  • Filters: These will appear as controls for the end user so that they can select values to filter
  • Parameters: Similar to filters, these will show up as controls for the end user to select a parameter option
  • Page controls: These are controls that give the end user options for paging分页 through the data
  • Legends: These include color, size, and shape legends to help the end user understand various visualizations
  • Highlighters: These allow the user to highlight various dimension values within views
  • Dashboard title: A special text object that displays the name of the dashboard sheet by default

Tiled versus floating

? ? ?An object is either tiled or floating. If it is a tiled object, it will snap into the dashboard or layout container where you drop it. If it is a floating object, it will float over the dashboard in layers它将分层浮动在仪表板上. You can change the order of the layers for a floating object.

? ? ?You'll notice the Tiled or Floating buttons directly beneath[b??ni?θ]在……下方,在……表面之下 the Objects pallet[?p?l?t]托盘 in the preceding screenshot. These buttons define the default setting for objects that you place on the dashboards, but you can change whether any given object is tiled or floating.

Tip

? ? ?Hold down the Shift key as you drag an object to quickly change it from tiled to floating, or floating to tiled.

? ? ?As you become experienced in designing dashboards, you'll likely develop a preference for designing using a predominately[pri'd?mineitili]占绝大多数地;主导性地;多数情况下 tiled approach or a predominately floating approach. (You can mix tiled and floating objects on any dashboard). Many designers find one design method or the other fits their style. Here are some considerations:

  • Precision: Floating objects can be sized and positioned to exact pixel-perfection, while tiled objects will depend greatly upon their containers for position and size.
  • Speed: Many designers find a tiled layout much faster to create as they don't have to worry about precision or layering.
  • Dynamic resizing: Floating objects work well on a fixed-size dashboard, but a dashboard that dynamically resizes based on window size will shift floating objects, often into undesirable locations. Tiled objects move and resize more reliably (but not always perfectly!).
  • Flexibility: Certain design techniques can be accomplished with one approach or the other. For example, transparent visualizations can be layered on top of background images using a floating technique. However, sheet swapping (which we'll consider in Chapter 11 , Advanced Visualizations, Techniques, Tips and Tricks) is often accomplished with a tiled approach.

Experiment with various design techniques and feel free to develop your own style!

Manipulating objects on the dashboard

? ? ?You may wish to manipulate an object once it is part of a dashboard. Every object has certain controls that become visible when you select it:

  • Grip: Click and drag the grip to move the object.
  • Remove from Dashboard: Click this to remove the object from the dashboard.
  • Go to Sheet: To edit a single visualization on a dashboard, use this button to navigate to the individual sheet.
  • Use as Filter: Clicking here will enable the view to be used as a filter. Selecting a mark in the view will now filter other views in the dashboard. We'll look at the specifics of filter actions later in this chapter and how you can have more fine control over how a view can be used as a filter.
  • More Options: This drop-down arrow reveals a host of options for the object, including control display options for parameters and filters; showing or hiding titles or captions on views; adding legends, parameters, and filters to the dashboard; formatting, layout, and size options; and more.
  • Object Sizing Border: Hovering over the border will cause your cursor to change to a sizing cursor. You can drag the border to adjust the size of the object.

Tip

? ? ?You may notice different sizing behavior based on what type of container an object is inside and whether the object is tiled or floating.

Dashboard example – is least profitable always unprofitable?盈利最少的总是无利可图吗?

? ? ?Having covered some conceptual topics as well as practical matters related to dashboard design, we'll dive into an example.

? ? ? Let's say you've been tasked with helping management find which items are the least profitable. Management feels that most of the least profitable items should be eliminated from their inventory. However, since you've done your analysis, you've discovered that certain items, while not profitable overall, have made profit at times in various locations. Your primary objective is to give management the ability to quickly see an analysis of the least profitable items to identify whether an item has always been unprofitable. This example will combine aspects of a guided analytics dashboard and an exploratory tool.

Building the views

? ? ?Use the Superstore Sales dataset and follow these steps to build the individual views that will form the basis of the dashboard:

  • 1. Create a bar chart showing profit by category. Sort the categories in descending order by the sum of profit.
  • 2. Add the Department field to Filters and show a filter. To accomplish this, use the drop-down menu of the Department field in the data pane and select Show Filter.
  • 3. Name the sheet Overall Profit by Category:
  • 4. Create another, similar view showing profit by item. Sort the items in descending order by the sum of profit.
  • 5. You'll notice that there are too many items to see at one time. For your objectives on this dashboard, you can limit the items to only the top 10 least profitable. Add the Item field to the filters shelf, select the Top tab, and adjust the settings to filter By field. Specify the Bottom 10 by Sum(Profit) :
  • 6. Rename the sheet as Top 10 Least Profitable Items:
  • 7. Create another sheet that displays a filled map of profit by state. You can accomplish this rather quickly by double-clicking the State field in the data window and then dropping Profit on the Color shelf.
  • 8. Rename the sheet to Profit by State:?
  • 9. Create one final sheet to show when profits were made or lost. Ensure that the Order Date field has been added as the Quarter date value and that it is continuous (green).
  • 10. Add a linear trend line. To do this, switch to the Analytics tab of the left sidebar and drag Trend Line from Model to the view. Alternatively, right-click a blank area of the canvas of the view and select Trend Lines | Show Trend Lines.
  • 11. Rename the sheet to Profit Trend:

Creating the dashboard framework?

? ? ?At this point, you have all of the necessary views to achieve the objectives for your dashboard. Now, all that remains is to arrange them and enable the interactivity that's required to effectively tell the story:

  • 1. Create a new dashboard by clicking the New Dashboard tab to the right of all existing worksheet tabs or by selecting Dashboard | New Dashboard from the menu.
  • 2. Rename the new dashboard as Is Least Profitable Always Unprofitable?.
  • 3. At the bottom of the left sidebar, check Show dashboard title.
  • 4. Add the views to the dashboard by dragging them from the Dashboard pane of the left sidebar and dropping them into the dashboard canvas. Arrange them as follows:? ? ?After adding views to the dashboard, you'll want to take some time to reposition改变……的位置;使变换阵地 and resize various elements and views.
  • 5. Use the drop-down menu on the Department filter and change the control to a Single Value (dropdown).
  • 6. You'll notice that changing the value of the filter only changes the Overall Profit by Category view. You can adjust which views the filter applies to by using the drop-down menu. Using the drop-down menu, select Apply to Worksheets | All Using This Data Source.

    ? ? ?Options for applying filters may be set using the drop-down on the filter control or on the field on the Filters shelf in the view. The options include the following:
    • All Using Related Data Sources: The filter will be applied to all data sources where that field is related between data sources. Relationships may be edited from Data | Edit Relationships on the main menu.
    • All Using This Data Source: The filter will be applied to any view using the data source as the primary data source.
    • Selected Worksheets...: The filter will be applied to worksheets you select.
    • Only This Worksheet: The filter will be applied only to the current worksheet.
  • 7. From the left sidebar, drag and drop a Text object above Top 10 Least Profitable Items and enter the following instructions:
    1. Select a Department from the dropdown
    2. Select a category below
    3. Select an Item below
  • 8. Using the grip, move the Department filter immediately above the?Overall Profit by Category?view.
  • 9. Size the text object to align the Top 10 view with the Overall view
  • 10. Move the Profit color legend below the Profit by State view.
  • 11. Use the drop-down menu of Overall Profit by Category to Fit | Entire View. This will ensure that all of the categories are visible without the need for a scrollbar.
  • 12. Additionally, fit the Top 10 Least Profitable Items to Entire View.?

At this point, your dashboard should look similar to the following:?

Implementing actions to guide the story

? ? ?You now have a framework that will support the telling of the data story. Your audience will be able to locate least profitable items within the context of a selected category. Then, the selection of an item will answer the question as to whether it has always been unprofitable in every location. To enable this flow and meet your objectives, you'll often need to enable interactivity. In this case, we'll use actions. We'll conclude this example with some specific steps and then unpack the intricacies['intrik?siz]?纷繁难懂之处,错综复杂的事物?of actions: of actions:

  • 1. Click the Use as Filter button on the Overall Profit by Category view. This will cause the view to be used as an interactive filter for the entire dashboard. That is, when the user selects a bar, all other views will be filtered based on the selection:
  • 2. From the main menu, select Dashboard | Actions. You'll see a list containing one action named Filter 1 (generated) . This is the action that was created when you selected Use as Filter previously:
  • 3. Click the Add Action > button and select Filter. The resulting dialog gives you options for selecting the source and target, as well as additional options for the action.
  • 4. Here, we want an action that filters everything except the Overall Profit by Category view when the user selects an item.
    ? ? ?In the Add Filter Action dialog,
    set Source Sheets to Top 10 Least Profitable Items, and
    Target Sheets to Profit by State and Profit Trend.
    Make sure that the action is set to run on Select (Run action on:).
    Name the filter Filter by Item, and then click OK on this dialog. Do the same on the Actions dialog(OK):

You now have 3 filters (2 are actions) that drive the dashboard:

  • Department Filter
    Selecting a Department
    from the drop-down will filter the entire dashboard (and actually all views in the workbook as you set it to filter every view using the data source)
  • Overal Profit by Category filter(action)
    Selecting a Category
    (clicking a bar or header) will filter the entire dashboard to that selection
  • Top 10 Least Profitable Item filter(action)
    Selecting an Item (clicking a bar or header)
    will filter the Profit by State and Profit Trend dashboards

Tip

? ? ?You can clear a selection in a view by clicking a blank area or by clicking the selected mark one more time. For example, if you clicked the bar for Bookcases to select it (and thus filter the rest of the dashboard), you may click the bar one more time to deselect it.

Experiment with the filters and actions to see how your dashboard functions.

Interlude – context filtering

? ? ?You may have noticed that when you use the drop-down filter to select a single Department or select a single category, you have fewer than 10 items in the Top 10 view. For example, selecting Furniture from the Department filter and clicking on the bar for Tables results in only 3 items being shown. This is because the Top Item filter is evaluated at the same time as the action filter. There are only 3 items with the category of Tables that are also in the Top 10.

? ? ?What if you want to see the top 10 items within the category of Tables? You can accomplish
this using context filters.

? ? ?Context filters are a special kind of filter in Tableau that are applied before other filters. Other filters are then applied within the context of the context filters. Conceptually, context filters result in a subset of data upon which other filters and calculations operate. In addition to Top Filters, Computed Sets and Fixed Level of Detail calculations are also computed within the context defined by context filters.

? ? ?In this case, navigate to the Top 10 sheet and add the Department filterand the newly added action ( Category ) filterto the context using the drop-down menu of the fields on the Filters shelf. Once added to the context, those fields will be gray on the filters shelf. Now, you will see the top 10 items within the context of the selected Department and Category:

? ? ?Notice that adding filters to the context causes the fields to be color-coded gray on the Filters shelf.

Tip

? ? ?If you edit the action on the dashboard, the filter might be automatically updated and you may have to re-add it to the context.

? ? ?Go ahead and step through the actions by selecting a couple of different categories and a couple of different items. Observe how the final dashboard meets your objectives by telling a story:you've discovered that certain items, while not profitable overall, have made profit at times in various locations
Is Least Profitable Always Unprofitable? Answer: No

? ? ?The user has selected Technology from the Department drop-down, Telephones and Communications from the category list, and then Item 10631, which is the least profitable item within the category. This reveals the states where the item was sold (color-coded by profit) and a time series of profit for the item.

? ? ?Should management remove item 10631 from the inventory?
? ? ? ? ??Not without first considering that the item only lost profit in one instance and that the trend is positive toward greater profitability. Granted, the original loss was a large loss, but this was also a long time ago and every subsequent sale of the item resulted in gain. The results of your findings may lead to further analysis to determine what factors play a part in the profit and loss for the item and better decision making by management.

Tip

? ? ?When you look at the Chapter 07 Completed workbook, you'll only see a tab at the bottom for the dashboard. The individual views have been hidden. Hiding tabs for sheets that are used in dashboards or stories is a great way to keep your workbook clean and guide your audience away from looking at sheets that are meant to be seen in the context of a dashboard or story.

  • To hide a sheet, right-click the tab and select Hide Sheet. To unhide a sheet, navigate to the dashboard or story using the sheet, right-click the sheet in the left-hand side pane, and uncheck Hide Sheet.
  • Additionally, you can hide or unhide all sheets that are used in a dashboard by right-clicking the dashboard tab and selecting the appropriate option.
  • Sheets that are used in tooltips may be hidden or unhidden in the same way.?
    https://blog.csdn.net/Linli522362242/article/details/123366816

Designing for different displays and devices

? ? ?When designing a dashboard, some of the first questions you'll often ask yourself are: How will my audience view this dashboard? What kind of device will they use? With the wide adoption of mobile devices, this question becomes very important because what looks great on a large flat screen monitor doesn't always look great on a tablet or phone.

? ? ?The top of the Dashboard tab on the left sidebar reveals a button to preview the dashboard on various devices, as well as a drop-down for Size options:

? ? ?Clicking the Device Preview button not only allows you to see how your dashboard will look with various device types (and even specific models), but also allows you to add a layout for each device type, which you can customize:

? ? ?You can not only see how your dashboard will appear on various devices and models, but also how it will look based on the orientation of the device and whether the Tableau Mobile app is used (if available for the selected device).

? ? ?Clicking the Add Layout button (that is, the Add Tablet Layout button in the preceding screenshot) will add a?Tablet layout under the Dashboard tab on the left sidebar:
? ? ?Each layout can have its own size and fit options, and the layout options allow you to switch from Default to Custom. This gives you the ability to rearrange the dashboard for any given layout. You may even remove views and objects for a certain layout. For example, you might simplify a dashboard to one or two views for a phone while leaving three or four in place for a desktop display.

? ? ?The Chapter 07 Completed workbook contains an example of the profit analysis dashboard and has a couple of layout options. For example, here is that dashboard formatted for display on a phone in which the dashboard will fit according to the width of the phone and allow for scrolling up and down:

?
Duplicate==>

? ? ? As you can see, the arrangement of the dashboard for the phone means that Profit by State and Profit Trend do not appear within the preview boundaries for a phone device. However, they are only a finger swipe away.?

How actions work

? ? ?In Tableau, an action is a user initiated event that triggers a response from Tableau. You've seen a few examples of actions being used in dashboards already. We'll now consider some details of how actions work in Tableau.

Tableau supports five kinds of actions:

  • Filter actions: The user's action causes one or more filters to be applied to one or more views.
  • Highlight actions: The user's action causes specific marks and headers to be highlighted in one or more views.
  • URL actions: The user's action causes a specific URL to be opened (either in a browser, a new tab, or in an embedded web object).
  • Set actions: The user's action defines a set. Sets may be used in calculations, filters, and on shelves to define visual attributes of marks. This opens a lot of possibilities to allow for complex and creative interactions.
  • Parameter actions: The user's action changes the value of a parameter. This allows the user to visually interact with parameters in new and exciting ways! (As of this writing, parameter actions have not been released, but are planned in the near future).

? ? ?Certain actions are automatically generated by Tableau based on shortcuts. For example, you can select Use as Filter from the drop-down menu of a view on a dashboard, which results in an automatically generated filter action. Enabling highlighting

  • using the button on a discrete color legend
  • or from the toolbar will automatically generate a highlight action:


? ? ?You can also create or edit dashboard actions by selecting Dashboard | Actions from the menu. Let's consider the details of each type of action.

Filter actions

? ? ?Filter actions are defined by source sheet(s) that pass one or more dimensional values as filters to Target sheets upon an action. Remember that every mark on a sheet is defined by a unique intersection of dimensional values. When an action occurs involving one or more of those marks, the dimensional values that comprise the mark(s) can be passed as filters to one or more Target sheets.

This screen allows you to do the following:

  • Name the filter.
  • Choose Source and Target sheets.
    • The Source sheet?is where the user will initiate the action (hover, selection, menu) and
    • the Target sheet is where the response will be applied (filtering in this example, but also highlighting).
  • Set the action that triggers the filter and whether the selection of multiple marks or only a single mark initiates the action.
  • Choose what happens when the selection is cleared().
  • Specify which dimensions are used to pass filter values to the Target sheet(s).

Tip

? ? ?Try to name your actions using names that help you differentiate between multiple actions in the dashboard. Additionally, if your action is set to run on Menu, then the name you use will be shown as a link in the tooltip. Use the arrow to the right of the name to insert special field placeholders. These will be dynamically updated with the values of the fields for a mark when the user sees the menu option in a tooltip.?

? ? ?You may select as many source and Target sheets as you desire. However, if you specify specific Target filters in the bottom section, the fields you select must be present in the Source sheet (for example, on Rows, Columns, and Detail). You will receive a warning if a field is not available for one or more Source sheets and the action will not be triggered for those sheets. Most of the time, your source and target will be the same dashboard. Optionally, you can specify a different Target sheet or dashboard, which will cause the action to navigate to the target in addition to filtering.

Warnings or important notes

? ? ?When filter actions are defined at a Worksheet level (when viewing a worksheet, select Worksheet | Actions from the menu), a menu item for that action will appear as menu items for every mark on every sheet that uses the same data source. You can use this to quickly create navigation between worksheets and from dashboards to individual worksheets.

Filter actions can be set to occur on any one of three possible actions:

  • Hover: The user moves the mouse cursor over a mark (or taps a mark on a mobile device).
  • Select: The user clicks or taps a mark, and a rectangle/radial/lasso selects multiple marks by clicking and dragging a rectangle around them and clicks a header (in which case all marks for that header are selected).

    ? ? ?A user may deselect by clicking/tapping the already selected mark, clicking/tapping an empty space in the view, or by clicking/tapping the already selected header.
  • Menu: The user selects the menu option for the action on the tooltip.

? ? ?Consider the following example of a filter action that's triggered when a bar is selected in the source:?

  1. Insert | Sheet Name
  2. When filter actions are defined at a Dashboard level
    Dashboard | Actions... ==> Add Action > ==> Filter... ==>Source to Target FilterTarget sheet will be triggered!
    Source Sheet was not triggered!
  3. When filter actions are defined at a Worksheet level
    Worksheet | Actions... ==> Add Action > ==> Filter... ==>Source sheet to Target sheet Filter


    the Target sheet?and the Target sheet?in Source and Target Example Dashboard were triggered! But the Source sheet in?Source and Target Example Dashboard were not triggered!

? ? ?Each bar mark in the source is defined by the Category dimension. When the bar for Tables is selected, a single filter is set on the target.

? ? ?If the mark is defined by more than one dimension (for example, Category and Region ), then the Target sheet will still have a single filter with the combination of dimension values that had been selected.
In this example, the filter contains Office Machines and West, matching the dimensions that define the selected square:

? ? ?By default, all dimensions present in the source view are used in a filter action. Optionally, you can specify which fields should be used. You can use the Selected Fields option in the Edit Filter Actions dialogue to accomplish the following:

  • Filter based on fewer dimensions.
    ? ? ?For example, if you only selected the Region field, then selecting the preceding square would only pass the West region as a filter to the target.


    the result of the filter only contains West(the Region)?is different with the result of the filter contains Office Machines and West (Category and Region)
  • Filter a target view using a different data source. The Selected Fields option allows you to map the source field to a target field (even if the target field has a different name, though the values must still match).
    ? ? ?For example, if the target used a data source where East was a possible value for a field named Area, you could map Region from the source to Area in the target.

Highlight actions?

? ? ?This type of action does not filter Target sheets. Instead, highlight actions causes marks that are defined, at least in part, by the selected dimensional value(s) to be highlighted in the Target sheets. The options for highlight actions are very similar to filter actions, with the same options for source and Target sheets and what event triggers the action.

? ? ?Consider a dashboard with 3 views and a highlight action based on the Region field. When the action is triggered for the West region, all marks defined by West are highlighted. The dimension(s) that are used for highlight must be present in all views where you want the highlighting to be applied. Both the map and scatter plot have Region on the Detail of the Marks card:

Warnings or important notes

? ? ?Highlighters (also called data highlighters) are shown as user controls (similar to filters and parameters) that cause highlighting based on user interaction. They can be applied to one or more views and will highlight the marks of the views. They do not create an action. To add Highlighters,

  • select any discrete (blue) field in the view and use the drop-down menu to Show Highlighter.
  • Alternatively, you can use the menu and select Analysis | Highlighters.
  • On a dashboard, you can add a highlighter using a view's drop-down menu and selecting Highlighters(?==> select State?).?

URL actions

  1. On a worksheet, select?Worksheet?>?Actions.

  2. From a dashboard, select?Dashboard?>?Actions.URL Actions - Tableau

? ? ?URL actions allow you to dynamically generate a URL based on an action and open it within a web object in the dashboard or in a new browser window or tab. URL actions can be triggered by the same events as filter and highlight actions. The name of the URL action differentiates it and will appear as the link when used as a menu.

? ? ?The URL includes any hardcoded values you enter as well as placeholders that are accessible via the arrow to the right of the URL text box. These placeholders include fields and parameters. The values will be dynamically inserted into the URL string when the action is triggered based on the values for the fields that make up the selected mark(s) and current values for parameters.

Tip

? ? ?Some web pages have different behaviors when viewed in iframes. The browser object does not use iframes in Tableau Desktop or Tableau Reader, but does when the dashboard is published to Tableau Server, Tableau Online, or Tableau Public. You will want to test URL actions based on how your dashboards will be viewed by your audience.

? ? ?You may specify a target for the URL action when you create or edit the URL action:

? ? ?Options include New Browser Tab, Web Page Object (you may select which object if you have more than one on the dashboard), and Browser Tab if No Web Page Object Exists. If you have more than one web page object on the dashboard, you may wish to give them meaningful names to make selection easier. To accomplish this, switch to the Layout tab on the left-hand side pane and expand the Item hierarchy until you locate the objects you wish to rename. Right-click the object and select Rename Dashboard Item:

Set actions

? ? ?Set actions allow you to populate[?pɑ?pjule?t]充满,(给文件)增添数据,输入数据,填充 a set with one or more values for one or more dimensions. This is very powerful because sets can be used on any shelf to encode any visual element, can be leveraged in calculations, and can be used as filters. They can be used in all of these ways—and in different ways—in different views. This gives you incredible flexibility in what can be accomplished with set actions. We'll first take a moment to define sets more clearly and then look at an example of a set action.

Sets

? ? ? A set in Tableau defines a collection of records from the data source. At a row-level, each record is either in or out of the set. There are two types of sets:

  • Dynamic sets (sometimes called Computed or Calculated sets)
  • Fixed sets

dynamic set?

? ? ?A dynamic set is computed for a single dimension based on a conditional calculation you define. As the data changes, the results of the condition may change and records may switch between in to out of the set.
? ? ?For example, if you were to use the drop-down menu on the Customer Name in the data pane and select Create | Set, then you could stipulate a condition that defines which records belong to the set:In this example, we've created a dynamic set named Customers who purchased more than $100 with a condition that's set by the Sum of Sales being greater than 100. You'll notice that there are also options for computing by formula or Top N. All of these conditions are going to be at an aggregate level (across the entire dataset or across the context if context filters are used) and then each record is evaluated as to whether it is in or out of the set. In this case, the total sales for each customer will be computed across the dataset and then each record will be counted in or out of the set计入或计出集合 based on whether the customer for that record has total sales greater than $100.?

A fixed set

? ? ?A fixed set is a list of values for one or more dimensions. If the values for a single record match the list defined by the set, then the record is in the set and out otherwise.
? ? ?For example, you might create another set based on the Customer Name field, this time with the General tab:

? ? ?Here, you can select individual values that will define what is in or out of the set. Note the option to Exclude rather than include values. In this case, we've created a set named Customers with the first name of Aaron. Any records that have a Customer Name that matches one of the 6 values we selected will be in the set. All others will be out. Because this is a fixed set, the values are not ever calculated or recalculated. If records with a customer named Aaron Burr show up in the dataset next week, they will still be out of the set.

As we'll see in the following example, set actions operate on fixed sets.

A set action example

  • 1. Use the drop-down menu on the Region field under Dimensions on the data pane to select Create | Set. Name the set Region Set.?
  • 2. In the resulting Create Set dialog, under the General tab, check one or more values. This creates a fixed set. In this example, it does not matter which, if any, values you select because you'll configure the set action to update the values momentarily[?mo?m?n?ter?li]<美>立刻.
  • 3. Create a bar chart of Sales by Category (for set example).?
  • 4. Drag the Region Set from Sets on the data pane and drop it on Color:

? ? ?You may use a set on shelves, just as you would any other field. Notice how the set gives two values, that is, In and Out, which define two colors. You may wish to adjust the colors to emphasize In.

Tip

? ? ?You may use sets in calculated fields as well. For example, the code [Region Set] gives a Boolean true/false result for each record, indicating whether it is In the set.

? ? ?Conclude the set action example by creating a region map, the dashboard, and implementing the set action.

  • 5. Use the drop-down menu on Region to select Geographic Role | Create?from... | State. This tells Tableau to treat Region as a geographic field based on its relationship with the geographic field State.
  • 6. In a new, blank worksheet, double-click the Region field to create the map view. Now that Region is recognized as a geographic field, Tableau will generate latitude,
    longitude
    , and the geometries that are necessary to render the shapes.
  • 7. Add both the map and bar chart(floating) views to a single dashboard. You may position them however you'd like.
    ????????==>
  • 8. Add a set action by selecting Dashboard | Actions... from the menu and then Add Action> | Change Set Values... in the resulting dialog. The resulting dialog has many similar features to other action types:You'll notice options to give the action
    • a Name;
    • Run action on: Hover, Select, or Menu;
    • and options for Clearing the selection.
    • Just like other action types, you may also specify Source Sheets that trigger the action.
    • The Target Set allows you to specify which data source and which fixed set in that data source will have values updated based on the action. In this case, we want to update the Region Set when a selection is made on the Sales by Region (set actions) view.
    • We'll elect to Remove all values from the set when the selection is cleared.
  • you may want to swap the order of?Out and In in the legend of In/Out of region Set:

    ? ? ?The dashboard consists of two views: a map and a bar chart. Selecting a Region on the map triggers a set action that updates the bar chart. A filter action would filter the bar chart, causing the length of each bar to only show the value for the selected region. Here, however, the set action is used to show the portion of the overall bar that belongs to that region while still retaining the full length of the bar for all regions.

? ? ?Once you have created the preceding action, your dashboard should function very similarly to the example that was shown at the beginning of this section. Selecting a region on the map highlights the portion of the bars that correspond to that region. This technique is known as brushing, or proportional brushing.

? ? ?This technique is only one of hundreds of the possible applications of set actions. Since sets can be used on any shelf and in calculations, updating the values via set actions opens up almost limitless possibilities for user interaction and analytics.

Use the?Set for calculation

? ? ? For example, the code [Region Set] gives a Boolean true/false result for each record, indicating whether it is In the set.

  • [Region Set]
  • SUM( IF [In Region]=FALSE THEN [Sales] END )/TOTAL(SUM([Sales]))

  • In / Out(Region Set) and format
    Allow labels?to overlap other marks

  • SUM( IF [In Region] THEN [Sales] END )/TOTAL(SUM([Sales]))

    Computing using |?In / Out(Region Set) and format

Dashboard example – regional scorecard

? ? ?Now, we'll consider another example dashboard that demonstrates slightly different objectives. Let's say everyone in the organization has agreed upon a key performance indicator of Profit Ratio. Furthermore, there is consensus[k?n?sens?s]?一致看法,共识 that the cut-off point between an acceptable and poor profit ratio is 15%, but management would like to have the option of adjusting the value dynamically to see whether other targets might be better.?

Let's consider how to create a?dashboard:

  • 1. Create a float type parameter named Profit Ratio KPI Target set to an initial .15 , formatted as a percent.
  • 2. Create a calculation field named Profit Ratio with the code SUM([Profit] ) / SUM([Sales] ) . This is an aggregate calculation that will divide the profit total by the sum of sales at the level of detail defined in the view.
    SUM([Profit])/SUM([Sales])

  • 3. Create a second calculation field named KPI - Profit Ratio with the following code:

    IF [Profit Ratio] >= [Profit Ratio KPI Target]
    THEN "Acceptable"
    ELSE "Poor"
    END

    ?This code will compare the Profit Ratio to the parameterized cut-off value. Anything equal to or above the cut-off point will get the value of Acceptable, and everything below will get the value of Poor.

  • 4. Create a new sheet named Region Scorecard . The view consists of Region on Rows, Order Date as a discrete date part on Columns, and the KPI - Profit Ratio field on both shape and color. You'll observe that the shapes have been edited to use checkmarks and Xs, and that the color palette is using color-blind-safe blue and orange.

  • 5. Add Column Grand Totals using the Analytics pane and format the grand totals with a custom label of Overall, with bold font and light gray shading.
  • 6. Add Order Date as a filter and set it to to the Top 6 by field (Order Date as Min). This will dynamically filter the view to the last six months:Border
  • 7. Create another sheet named Profit Ratio by Region.?
  • 8. If you skipped the set actions example,?use the drop-down menu on Region to select Geographic Role | Create?from... | State. This tells Tableau to treat Region as a geographic field based on its relationship with the geographic field State.
  • 9. Double-click the Region field in the data pane. Tableau will automatically generate a geographic visualization based on Region.
  • 10. Place Profit Ratio on Color and Label. You will also want to format Profit Ratio as a percentage. You may do so by formatting the field in this view specifically,
    ? ? ?or by setting the default number format for the field in the data pane (the latter is probably preferred as you will almost always want it to display as a percent).
  • 11. Additionally, add Region to Label. Rearrange the fields in the marks card to reorder the label
    ? ? ?or click the Label shelf to edit the label text directly.
  • if you want to apply the same filter to this view as you did to the Region Scorecard view. You may wish to navigate to the Region Scorecard sheet and use the drop-down on Order Date on the Filters shelf to apply the existing filter to multiple sheets:
    Region Scorecard
    ==>
  • 12.

? ? ?Once both views have been created, the dashboard can be constructed by arranging the two sheets, parameter control, and text appropriately.

  • add parameter?to this dashboard?Profit Ratio KPI Target
  • add a blank object to the left of?Profit Ratio KPI Target
  • add a highlight action based on the Region field
  • you may need to add phone layout
  • Add Horizontal Object to the bottom of dashboard as a container
  • drag the parameter named the Profit Ratio KPI Target to the Horizonta Object
  • drag the Blank Object?to the left of the?Profit Ratio KPI Target in the Horizonta Object==>
  • move Region Score Card to the bottom of dashboard

? ? ?This dashboard allows your audience to very quickly evaluate the performance of each region over the last six months. Executive management could very quickly pull this dashboard up on their mobile device and take appropriate action as needed.

? ? ?The dashboard provides interactivity with the KPI target parameter. Additional drill down into other dashboards or views could be provided if desired. If this view were published on Tableau Server, it is not unreasonable并非没有道理 to think that regional managers might subscribe to the view and receive a scheduled email containing an up-to-date image of this dashboard.?

Warnings or important notes?

? ? ?By default, all objects that are added to the dashboard are tiled. Tiled objects snap in place and appear beneath floating objects. Any object can be added to the dashboard as a floating object by switching the toggle under New Objects in the left window, or by holding Shift while dragging the objects to the dashboard.

? ? ?Existing objects can be switched between floating and tiled by holding Shift while moving the object or using the drop-down caret menu. The drop-down caret menu also gives you options for adjusting the floating order of objects. Additionally, floating objects can be resized and positioned with pixel precision by selecting the floating object and using the positioning and sizing controls in the lower left.

? ? ?You can mix tiled and floating elements, but many dashboard authors prefer to build dashboards that are composed of entirely of one or the other. This ensures consistency between different layouts and sizes of screens (especially if the dashboard is set to an Automatic or Range sizing option).?

Stories

? ? ?The Stories feature allows you to tell a story using interactive snapshots of dashboards and views. The snapshots become points in a story. This allows you to construct guided narrative or even an entire presentation.

? ? ?Let's consider an example in which story points might be useful. The executive managers are pleased with the Regional Scorecard dashboard you developed previously. Now, they want you to make a presentation to the board and highlight some specific issues for the South region. With minimal effort, you can take your simple scorecard, add a few additional views, and tell an entire story:

  • 1. First, we'll build a couple of additional views. Create a simple geographic view named ProfitRatio KPI by State. Make this a filled map with the KPI – Profit Ratio field, defining color.
  • 2. Add Profit Ratio to the Detail of the Marks card so that it is available for later use:
    and format
  • 3. Create one additional view named Profit Ratio by Quarter. Use Order Date as a continuous date value on Columns and Profit Ratio on Rows.
  • 4. Set the mark type to bars. Add a reference line for the Profit Ratio KPI Target parameter value (you can right-click the Profit Ratio axis and set it to Add Reference Line...).
  • 5. Add KPI – Profit Ratio to Color. You may also wish to click the Color shelf and add a border.
    ==>==>
  • 6. Go ahead and filter the view to the south Region and use the drop-down menu to apply that filter to the Profit Ratio KPI by State view as well:
  • 7. Create a new dashboard with the two new views arranged in the same way as what's shown in the following screenshot. Add the Profit Ratio KPI Target parameter and Region filter if they do not show. and Region filter use?
  • 8. Use the drop-down on Profit Ratio KPI by State to use that view as a filter:
    How to Display Only One Country on the Map
    • 1. Confirm the view is displayed as "Map" on mark card in worksheet named ProfitRatio KPI by State.
    • 2. On the menu bar, Click on [Map] > [Map layers] to open map layer side menu.==>
    • 3. On the map layer side menu, set the "Washout" to 100%.Profit Ratio Analysis Dashboard?
  • 9.? Create a New Story by selecting Story | New Story from the menu, or by using?the new story tab at the bottom next to the existing sheets:

Warnings or important notes?

? ? ?The Story interface consists of a sidebar with all visible dashboards and views. At the top, you'll see the Story Title, which can be edited. Each new point in the story will appear as a navigation box with text that can also be edited. Clicking on the box will give you access to the story point, where you can then add a single dashboard or view.?

? ? ?You can create new story points using the New Blank Point button (for a new story point), the Duplicate button (which will create a duplicate snapshot of the currently selected story point), or the Save as New Point button (which will capture the current state of the dashboard as a new story point).

? ? ?Clicking on a story point navigation box will bring up the snapshot of the view or dashboard for that story point. You may interact with the dashboard by doing such things as making selections, changing filters, changing parameter values, and adding annotations. Changing any aspect of the dashboard will present you with an option to Update the existing story point to the current state of the dashboard. Alternatively, you can use the Revert button above the navigation box to return to the original state of the dashboard. Clicking the X will remove the story point.

? ? ?Each story point contains an entirely independent snapshot of a dashboard. Filters selections, parameter values, selections, and annotations will be remembered for a particular story point, but will have no impact on other story points or any other sheet in the dashboard.

? ? ?You may rearrange story points by dragging and dropping the navigation boxes.

How do I add a dashboard to a story in tableau?

? ? ?To start building your story,?double-click a sheet on the left to add it to a story point. In Tableau Desktop, you can also drag sheets into your story point. When you add a sheet to a story point, that sheet remains connected to the original sheet.

We'll build the story by completing the following steps:

  • 1. Give the story the title South Region Analysis.?
  • 2. Add the Regional Scorecard dashboard as the first story point.
    • Select the South region in the map.
    • Give the story point the following text: The South Region has not performed well the last 6 months:
    • You may want to Display Only One Country on the Map,?go back the worksheet Profit Ratio by Region
  • 3. Click the New Blank Point button to create a new story point and drag the Profit Ratio Analysis dashboard to the point.
  • 4. Give this story point a caption of Only one state has met the 15% target overall.?
  • 5. Right-click Virginia on the map and select Annotate | Mark. Keep the state and profit ratio as part of the annotation:
  • 6. Click the Duplicate button to copy the current story point. Give this new story point a caption of 3 states would meet a goal of 10%. Set the Profit Ratio KPI Target to 10.00% and update the point.
  • 7. Click the Duplicate button again and give the newly created point a caption of Certain states have performed well historically某些州在历史上表现良好.
  • 8. Right-click the annotation for Virginia, select Remove to delete it, and then add a similar annotation for Louisiana. Then, click Louisiana to select that state.
  • 9. Make sure to click the Update button to capture the state of the dashboard.

? ? ?In Presentation Mode, the buttons for adding, duplicating, updating, or removing story points are not shown. Your final story should look similar to previous each story point.

? ? ?Take some time to walk through the presentation. Clicking navigation boxes will show that story point. You can fully interact with the dashboard in each story point. In this way, you can answer questions on the fly and dig into details, and then continue through the story.

Tip

? ? ?A great way to learn about dashboard techniques (and data visualization techniques in general) is to subscribe to Viz of the Day ( https://public.tableau.com/app/discover/viz-of-the-day ). A new visualization, dashboard or story is featured each day. When you see a design technique or visualization you want to understand, you can download the workbook and explore the various techniques that were used.

Summary

? ? ?When you are ready to share your discovery and analysis, you will likely use dashboards to relate the story to your audience. The way in which you tell the story will depend on your objectives, as well as your audience and the mode of delivery. Using a combination of views, objects, parameters, filters, and legends, you can create an incredible framework for telling a data story. Tableau allows you to specifically design layouts for different devices to ensure that your audience has the best experience possible. By introducing actions and interactivity, you can invite your audience to participate in the story. Story points will allow you to bring together many snapshots of dashboards and views to craft and present entire narratives.?

? ? ?In the next chapter, we'll turn our attention to some deeper analysis involving trends, distributions, forecasting, and clustering.?

  游戏开发 最新文章
6、英飞凌-AURIX-TC3XX: PWM实验之使用 GT
泛型自动装箱
CubeMax添加Rtthread操作系统 组件STM32F10
python多线程编程:如何优雅地关闭线程
数据类型隐式转换导致的阻塞
WebAPi实现多文件上传,并附带参数
from origin ‘null‘ has been blocked by
UE4 蓝图调用C++函数(附带项目工程)
Unity学习笔记(一)结构体的简单理解与应用
【Memory As a Programming Concept in C a
上一篇文章      下一篇文章      查看所有文章
加:2022-03-21 21:25:48  更:2022-03-21 21:29:52 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2025年1日历 -2025/1/16 18:50:36-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码