Skip to main content

Posts

Showing posts from March, 2019

Make all the stacked bar the same size.in tableau

CREATE EQUAL SIZED SEGMENTS IN A STACKED BAR Make each segment in a stacked bar the same size. Follow the steps below  Select  Analysis  >  Create Calculated Field . Name the field  Size , Enter 1 and click OK. Drag  Size  onto either the columns or rows shelf. Right click  Size  on the view and select  Measure  >  Minimum . Place the desired dimension on  Color .

Data Blending in Tableau

All about Data Blending in Tableau Prerequisites for data blending Differences between joins and data blending Blend your data Data blending limitations Data blending is a method for combining data that supplements a table of data from one data source with columns of data from another data source. Usually you use joins to perform this kind of data combining, but there are times, depending on factors like the type of data and its granularity, when it's better to use data blending. For example, suppose you have transactional data stored in Salesforce and quota data stored in an Excel workbook. The data you want to combine is stored in different databases, and the granularity of the data captured in each table is different in the two data sources, so data blending is the best way to combine this data. Data blending is useful under the following conditions: You want to combine data from different databases that are not supported by cross-database joins. Cro

Differences between joins and data blending in tableau

Differences between joins and data blending Data blending simulates a traditional left join. The main difference between the two is  when  the join is performed with respect to aggregation. Left join When you use a left join to combine data, a query is sent to the database where the join is performed. Using a left join returns all rows from the left table and any rows from the right table that has a corresponding row match in the left table. The results of the join are then sent back to and aggregated by Tableau. For example, suppose you have the following tables. If the common columns are  User ID  and  Patron ID , a left join takes all the data from the left table, as well as all the data from the right table because each row has a corresponding row match in the left table. Data blending When you use data blending to combine data, a query is sent to the database for each data source that is used on the sheet. The results of the queries, including the aggregated d

Join types in Tableau

Join types in Tableau There are four types of joins usually used the most that wwe can use to combine the data in Tableau: inner, left, right, and full outer.  Join Type Result Description Inner When you use an inner join to combine tables, the result is a table that contains values that have matches in both tables. Left When you use a left join to combine tables, the result is a table that contains all values from the left table and corresponding matches from the right table. When a value in the left table doesn't have a corresponding match in the right table, you see a null value in the data grid. Right When you use a right join to combine tables, the result is a table that contains all values from the right table and corresponding matches from the left table. When a value in the right table doesn't have a corresponding match in the left table, you see a null value in the data grid. Full outer When you use a full outer join to combine tables, the re

Context Filters in Tableau

Context  Filters By default, all filters that you set in Tableau are computed independently. That is, each filter accesses all rows in your data source without regard to other filters. However, you can set one or more categorical filters as  context  filters for the view. You can think of a  context  filter as being an independent filter. Any other filters that you set are defined as dependent filters because they process only the data that passes through the  context  filter. You may create a  context  filter to: Improve performance – If you set a lot of filters or have a large data source, the queries can be slow. You can set one or more  context filters to improve performance. Create a dependent numerical or top N filter – You can set a  context  filter to include only the data of interest, and then set a numerical or a top N filter. For example, suppose you’re in charge of breakfast products for a large grocery chain. Your task is to find the top 10 breakfast produc

Error "Cannot mix aggregate and non-aggregate arguments with this function"

Error "Cannot mix aggregate and non-aggregate arguments with this function" When Creating a Calculated Field When creating a calculation, the following error might occur:  "Cannot mix aggregate and non-aggregate arguments with this function." The issue can be resolved through one of the below options: Modify the calculation so that all fields are either aggregate or non-aggregate. Each option can result in different values (please reference the additional information section for specific examples). Option 1 (Aggregate Then Divide) Wrap all fields in an aggregation. Sample: [Profit] / SUM ([Sales]) -> SUM ([Profit]) / SUM ([Sales]) Option 2 ( Divide Then Aggregate) Remove aggregations from all of the fields. Sample: [Profit] / SUM ([Sales]) ->[Profit] / [Sales]   Option 3 ( Condition Then Aggregate) Move the aggregation so all fields are aggregated. For example, the calculation: IF [Row ID] = 1 THEN SUM( [Sales] ) END  could become:

Create Dynamic Titles Tableau

Create Dynamic Titles Tableau In Tableau Desktop, create a new worksheet named "Title." Drag the field you want to change dynamically to  Detail . In the example workbook,  Product Category  is used. Change the mark type to  Polygon . Select  Worksheet  >  Show Title . Right-click the Title shelf and select  Edit Title . In the Edit Title dialog box, delete  <Sheet Name> , select  Insert  >  Product Category , and then click  OK . Drag  Product Category  to  Filters  and click  OK . Right-click  Product Category  on Filters and select  Show Filter . Create a dashboard and add the Title sheet to the dashboard. Resize the worksheet on the dashboard as needed to display the title More detailed explanation in the video: https://youtu.be/v3C9SEtDTao

Pivot Data from Columns to Rows

Pivot Data from Columns to Rows Pivot data from columns to rows(which is also called as wide format to long format) can be done in Tableau for only Excel sources. If we use any data sources we need to create the view in database by using multiple UNION's as explained in sql below. For example, suppose you have the number of devices sold by quarter for three vendors in three separate fields. You can pivot your data so that the vendor is in one field and the number of devices sold is in another field. Pivot the data After you have set up the data source, in the grid, select two or more columns. Click the drop-down arrow next to the column name, and then select  Pivot . New columns called "Pivot field names" and "Pivot field values" are created and added to the data source. The new columns replace the original columns that you selected to create the pivot. Add to the pivot To add more data to the pivot, select another column, click the