문제

I have an Excel doc being used, and in it there are 6 worksheets, each a different company. The data types and names are all the same within each tab.

In Tableau, I have joined all the worksheets and I have a "Companies" dimension, which translates to showing 6 columns on the graph, one for each company.

What I need help with is the following. 2 of the companies are the same, except their data differs slightly on purpose to show that the results are skewed based on outside forces.

In other words, this is what I am working with:

Companies (from Excel worksheets, joined into a single dimension):

  • 1, 2, 3, 4, 5a, 5b

Set A: "Correct Results"

  • 1, 2, 3, 4, 5a

Set B: "Skewed Results"

  • 1, 2, 3, 4, 5b

I need Set A's columns showing on the graph by default, but I need a filter or action that will allow the user to switch the groups, without having to select the companies individually, such as a single-select radio-button style filter with the following:

Choose a Set:

  • Set A - On
  • Set B - Off

I know this is possible, but I can't decide on the best way to do it.

Currently, I have an Exclude single-select filter on, which will exclude the selected group. The downside is that users can go on to exclude Companies 1-4, which isn't good. It's also confusing to explain to them selecting Company 5a to exclude Company 5a. It's just not intuitive.

Any suggestions?

Here is a link to view what I was currently able to pull, described above:

http://public.tableausoftware.com/views/BMD-Full-Share-of-Voice/Full-Share-of-Voice?:embed=y&:toolbar=no&:tabs=no

도움이 되었습니까?

해결책

This isn't the most efficient way, but it works exactly as required:

Excel Setup

  1. Duplicate all tabs in the Excel doc
  2. Set all rows in the duplicated company tabs to a formula that pulls data from the original tabs, and then for each drag the cell formulas down until it matches all rows in the originals. For example:

    ['$Company A (Duplicate)'!A2] = 'Company A (Original)'!A2
    
  3. Create a new column in all of the tabs (sheets), including the duplicated ones, called 'Toggle.'

  4. For the original set of tabs, set the value to "Correct Results" or whatever "Toggle" value you need, and for the duplicated tabs, set the value to this column to always be the opposite value ("Skewed Results") — make sure this new column on the duplicated sheets does not pull data from the original, like the other columns.
  5. The oddball tab, the one with differing data (5b), should be the only duplicate company/tab that does not have formulas pulling in from its original tab. Update this tab's data manually, as if it's a separate company.

Tableau Setup

  1. JOIN all sheets in the Excel document into 5 UNIONS - one for each company. Essentially, we are merging the cloned sheets back together with the originals, effectively doubling the data for each company. For example, $5a and $5b are joined as $5 for Tableau's purposes; same goes for $1(original) and $1(clone) joined as $1.
  2. Tableau will now should doubled values for all graphs - this is because it's showing the original data, with each row's 'toggle' column value un-filtered. In other words, both "Correct Results" and "Skewed Results" row values are exposed and are being displayed. However, we still only have one column per company (which is what we want).
  3. Finally, create a Quick Filter in Tableau and simply make it a Radio or Select List type, expose it, and set the initial value to either "Correct Results" or "Skewed Results."

Presto - an intuitive toggle filter that effectively only switches the oddball company's values on the graph when toggled (5a to 5b, or SetA to SetB, or "Correct Results" to "Skewed Results"), inline with the other companies (whose values should not change).

The only downside to this besides redundant data, is the fact that (as far as I know), I will have to manually also drag the cloned formula down for the cloned company worksheets after adding new rows to the original (I found that dragging the formula down past the point where rows stop in the original sheet cause NULL or UNKNOWN values to appear, which mess up Tableau's graphs).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top