Skip to main content

Posts

Showing posts from March, 2020

Tableau filter to find Weekend or Weekday

Tableau filter to find Weekend or Weekday Create a calculated field using the date field with the case statement as shown below: CASE DATEPART('weekday',[Report Date])     WHEN 1 THEN 'Weekend'     WHEN 2 THEN 'Weekday'     WHEN 3 THEN 'Weekday'     WHEN 4 THEN 'Weekday'     WHEN 5 THEN 'Weekday'     WHEN 6 THEN 'Weekday'     WHEN 7 THEN 'Weekend' END Then drag this new dimension into filters pane and show filter. You can select the Weekend or Weekday option in the filter so that the data in the sheet which has the date field will change accordingly.

Sorting Filter Values in Tableau

Sorting Filter Values in Tableau When you right click on a filter there is no option to sort it. Even the option is not available in filters pane. Here is a simple way to do so: From the Data pane (where the Dimensions and Measures are displayed) right-click the dimension that you want to sort, and then select  Default Properties  >  Sort . Select  Manual , adjust the sort order using up and down arrows, and then click  OK as shown below:

Tableau Error "Trend line cannot be computed"

Tableau Error "Trend line cannot be computed" WIth the When you try to add trend lines to views, the following error might occur: A trend line cannot be computed. Typically, each axis should be either a number or a date. Refer to the Help for more information. To Fix the issue Right-click the date field on Rows or Columns, and select Continuous(usually date filed) as shown below. Now you can click on the mark(line or Bar) and select Trend Lines. You can see the trendline displayed.

Forecast Option Not Available in Tableau Desktop

Forecast Option Not Available in Tableau Desktop When you select  Analysis  >  Forecast , the options are not available (grayed out), and you are not able to use the forecasting functionality. Fix To fix the issue, take any one of the following steps that apply to your workbook. Remove table calculations. If the date field level is Exact Date, choose a different date level such as Week, Month, Qtr or Year which suits your requirements. Remove totals or percentages if they are displayed on the view.  Make sure that there are at least five entries in your time series. For example, if your date level is set to years, you must have at least five years of data, if months, at least five months. Remove measures from the Filters shelf. Make sure the data does not contain any nulls.  Cause A component of a data source or view that the forecasting functionality currently does not support is included in the view. More: In few instances, right-clicking the date on a shelf

Force to show dimension labels even if there are no values in Tableau

Force to show dimension labels even if there are no values Show the Dimension (values even if there is no data for the dimension in the measures, Show all the dimension labels always, regardless of whether or not there is data. It is a simple setting in Tableau and no need to work on any complex sql side manipulations. Go to Tableau desktop Analysis Table Layout Select SHow Empty rows as shown That's it you will see the empty rows now.

Hiding Zero Value Labels In A Pie Chart

Hiding Zero Value Labels In A Pie Chart By default Tableau shows the 0 values for the categories for which the data is not available. It is most requested by  users and is also common sense to hide these zero values. To Resolve the issue, change the measure calculation  to: IF [Measure Field] = 0 THEN NULL ELSE [ Measure   Field] END

MTD, Previous MTD, Last MTD, YTD and Previous YTD (LY YTD) Calculation in Tableau

MTD, Previous MTD, Last MTD, YTD and Previous YTD (LY YTD) calculation in Tableau MTD : Select  Analysis  >  Create Calculated Field  Name the field MTD Sales, enter the following calculation, then click OK: [Order Date] <= TODAY() AND DATETRUNC( "month", [Order Date]) = DATETRUNC("month", TODAY() ) Drag MTD onto the filter shelf and select "True" [Trip Date] <= TODAY() AND DATETRUNC( "month", [Trip Date]) = DATETRUNC("month", TODAY() ) OR if [Run Date] <= TODAY() AND DATETRUNC( "month", [Date Field]) = DATETRUNC("month", TODAY() )then ([Total Sales]) else 0 end Last MTD : IF DATEDIFF('month',[Run Date], TODAY()) = 1 AND DAY([ Date Field ]) <= DAY(TODAY())THEN ([Total Sales])END On the 1st of month MTD is usually shown blank, to handle this: Create " This MTD or Last MTD"  filter as shown below then create this logic:  ( DATEPART( 'day', TO

How to Remove the Null Values in Date Field?

This is a quick tip to do so: 1) Right click on the date field in the dimensions pane and select. 2) Change the date format what ever you want. 3) Convert that date dimension field in to the string . 4) And right click on the null value where it is present in the view. 5) Click on edit alias and  give the a name  or, type space or hyphen etc w. 6) Now convert that date dimension back to date form

Display more than 6 columns for dimensions in Tableau

Display more than 6 columns for dimensions in Tableau Go to Analysis-->Table Layout -->Advanced and change the number in Rows and Columns as per your need. You can't add more than 16 to this, but increase it to 16 (for identification). So, save the Tableau file with extension .TWB. Then open this file in notepad. Then search for the text: attr='row-levels'. You will find something like the below tag: <format attr='row-levels' value='16' /> <format attr='row-horiz-levels' value='16' /> Change the value of 16 to desired column numbers. Save the notepad file. Open it in Tableau. Otherwise, you can also try to convert the dimensions as measures and add as many columns as you want

Tableau Mark Label - Always Show for All Marks

Tableau Mark Label - Always Show for All Marks Follow the steps below to enable the marks on graph to be sown always. Go to the sheet where the graph is designed. Click on the 'Label' field on the Marks shelf, you'll get the option to allow labels to overlap Select it and close the marks card, it will show the Marks always.

Tableau bar graph not showing the data label for some bars

Tableau bar graph not showing the data label for some bars Sometimes Tableau bar graph may not show the data label for some of the bars if the Mark Label is set to automatic. To resolve this issue. Right click on the bar graph and select the bar which you want to set the label to be shown always. Select 'Mark Label' to 'Always Show' as shown below: This will display the mark label always.

Tableau If value is null then use previous value (PREVIOUS_VALUE)

Tableau If value is null then use previous value (PREVIOUS_VALUE) Create a calculated field which does the null check on the field and t o get the value from the previous cell, you'll have to use a tableau calculations as shown below . PREVIOUS_VALUE(expression) Returns the value of this calculation in the previous row. Returns the given expression if the current row is the first row of the partition. Example ifnull((sum([Direct Costs])), PREVIOUS_VALUE(sum([Direct Costs]))) SUM([Profit]) * PREVIOUS_VALUE(1) computes the running product of SUM(Profit)

Subscribe Tableau report to an email group/AD group

Subscribe Tableau report to an email group/AD group From the Explore section of your site, select  All Workbooks  or  All Views , or open the project that contains the view you want to subscribe to. Open a view either directly, or after opening the containing workbook. In the toolbar above the view, click  Subscribe . Add the Tableau users or groups you want to receive the subscription.  Individual users can be added under Subscribe Users and groups an be added to 'Subscribe Users in Groups' Under 'Include' select a particular workbook or entire workbook. Select the format as PDF or Image or both Set the Schedule time Enter the Subject Enter the message to be displayed in the email. Screenshot below shows the option where Subscribe Users in Groups is displayed: To receive a subscription, users must have the View and Download Image/PDF permissions. If they use Tableau Server, their accounts must also have email addresses.

Tableau PDF export error splits the text on last line into next page

Tableau PDF export error splits the text on last line into next page  We have issues with the display of Tableau dashboard PDF export, have found 2 issues which needs immediate resolution as it appears to be the issue with Tableau functionality. Here are the issues: The PDF export is splitting the last line of text at the end of the page into half and the other half is displayed at the starting of next page as shown in the screenshot below. Tableau is not adding page numbers to the PDF export as there is no option in Tableau to introduce the page numbers into the dashboard/sheet.

Disable/Reset Viz animations

To Reset animation settings for a workbook: You can reset animations to return an entire workbook to the default animation settings. Be aware that this turns animations off by default. Choose  Format  >  Animations . At the bottom of the  Animations  pane, click  Reset All . To Completely disable all animations: If you find animations distracting while viewing vizzes, you can completely disable them so they never play. (This isn't a system-wide setting; each user needs to apply it separately.) In Tableau Desktop, choose  Help  >  Settings and Performance , and deselect  Enable Animations . In Tableau Online or Tableau Server, click your profile image or initials in the top right corner of the browser, and choose  My Account Settings . Then scroll down to the bottom of the page, deselect  Enable animations , and click  Save Changes .

How create Tableau viz animations

Tableau viz animations Viz animations feature applies animated transitions to marks on a visualization to help you see and understand your changing data. Sorting, filtering, adding fields, and other actions will now smoothly animate your vizzes. Animations are a powerful tool for revealing and explaining the analytical steps that result in a visualization.  Tableau Viz animations can be classified as:  1. Simultaneous Animations and 2. Sequential Animations Simultaneous animations The default simultaneous animations are faster and work well when showing value changes in simpler charts and dashboards. Sequential animations Sequential animations take more time but make complex changes clearer by presenting them step-by-step. Steps to animate visualizations in a workbook Choose  Format  >  Animations . If you want to animate every sheet, under  Workbook Default , click  On . Then do the following: For  Duration , choose a preset, or

Tableau Dynamic Date Parameters in 2020

Tableau Dynamic Date Parameters Developers have to no  longer have to republish workbooks that contain parameters every time the underlying data changes.  This removes the need for tedious workbook maintenance, saving you exponential time and energy. Dynamic parameters also minimize complex workarounds, which makes interacting with workbooks a straightforward . To enable this feature, open the parameter dialog and note the new  When workbook opens  option.  Change the dropdowns selection to the relevant field and that’s it!  Tableau will now update the parameter’s list of values according to the column you selected as shown in the image below.  The date parameter that can now be configured to update automatically every time someone opens the workbook, always making the most-current data available.