Sunday, 27 December 2015

How to club the Data when Data Located in Different Tabs of Excel



I have come a cross the requirement, where Different County's data located in different Tabs of single Excel workbook.
So I used the Custom SQL option ti get the data of all sheets.




I have written the following SQL Query,

select * from [Country A$]

Union all

select * from [Country B$]

Union all

select * from [Country C$]




How to exclude the Current Month Data into Extracts



There is an option of "Apply Filter" while connecting to the Database, it means Database Filters.
And it may not enough to get the desired result.




Next Best option is writing the "Custom SQL" option.



If you want to keep only current Month Data in Extracts, then use the following "Custom SQL".



Saturday, 5 December 2015

How to apply color formatting only to actual values only not to Grand Totals

1) Create actual report with all required data. (Remove the Grand totals)



2) Create a copy of the actual report, then hide the headers.


3) Then apply the White color to the report in the 2nd (Duplicate) report.


4) Then add the above 2 reports in the dashboard, then do the arrangement accordingly.


How to to show Current Year YTD, Previous 2 Years YTD in the Report.



The following images shows how to create YTD, LYTD, Before LYTD.








Dynamically selecting the Sheets in the Dashboard

We use the Parameter to select the Sheet or Sheets dynamically on the Dashboard.

1) Create 3 Reports Individually.
a) Chart b) Line c) Text

 

2) Create a Parameter, here Values are defined as per our requirement.

3) Create a Calculated Field, which used to define the values which we can select from Parameter.
     
4) Drag "Sheet Selection" calculated field & define the values, if we select any one of these values then we will get this sheet on the Dashboard.
Here, values are All, Chart, Chart & Line, Chart & Text  for "Chart" sheet
5) Similarly, we can define the values for sheets "Text", Line"



6) Now add all 3 reports to Dashboard.
Now we can select the Sheets according to requirement.

   

Friday, 4 December 2015

Showing Labels only for selected Customers



1) Create a Parameter on "Customer Name".

 
2) Then create a calculated field as like below,

Name: Showing sales for Selected Customer

Syntax: if [Customer_Field] = [Customer_Parameter] then [Sales] end



3) now you can place all required Dimensions & Measures onto view.


4) right click on "Parameter" on the parameter window, then click on "Show Parameter Control".
5) Then drag the above calculated field  onto Labels.
 


How to clear the Filter Values in the Dashboard

I come across this situation, this requirement was asked my one of my Business Users,

There is no direct option in the Tableau but there is an alternative approach that is "Create a dummy field & place it in all reports & define the Action filter from Dummy to another report , place it on other Dashboard, it may not clear in words, the following illustrates very clearly.


1) Create actual dashboard with all required views.

2) Defined the action filter from as like below


3) Actions are working fine as below 2 Images.


As far now, Filters are working fine, action Filters are not clearing out directly.

Solution is as like below explanation:

1) Add a dummy field on new report as well as on actual reports.


2) Then create a view using that the dummy field.




3) Now Dummy field is added in actual reports as well as in dummy report. 



4) Create a Dashboard using that dummy report.

5) Now define the actions from Dummy Dashboard to Main Dashboard.
While creating action filters from Dummy Dashboard to actual Dashboard, 

Select  "Select Field" Radio Button, then select "Clear All" field in both Source & Target" sheets.


6) Now filter will be cleared. (Indirectly).


6) If you don't want to show "Clear all"  field on actual report, right click on "Clear All" field then click on "Show Header"