Monday 29 February 2016

Groups Creation in Tableau Server

Requirements:-

·       Create 4  groups: Operations Users, Operations Manager, Sales Users, and Sales Manager.
·       Import the additional 4 CSV files found in the directory path: “C:\Program Files\Tableau\installs”
·       Add the new users to the appropriate groups.
·       Change the site role to Publisher for all users.



Steps:-

     1.    Click on the Groups section in the toolbar
    2.    Click the “+ New Group” button

3.    Give your new group a name – Operations Users
4.    Click the “New Group” button


5.    Repeat steps 2-4 for the other groups: Operations Manager, Sales Users, and Sales Manager.
6.    Navigate to the Users section in the toolbar
7.    Click the “+ Add Users” button
8.    Click the “Import From File” button
 

9.    Click the “Browse…” button to search for the CSV files

10.    Select the “OPUSERS” CSV file found in the directory path: “C:\Program Files\Tableau\installs”
11.    Click the “Open” button

12.    Click the “Import Users” button

13.    Click the “Done” button

14.    Repeat steps 7-13 for the other CSV files: OPMGR, SALESUSERS, and SALESMGR
15.    Find the HR Manager user and click the “…” icon next to the user’s display name
16.    Click the “Site Role” option

17.    Select the “Publisher” site role from the drop-down menu
18.    Click the “Change Site Role” button.


19.    Repeat steps 15-18 for the other users associated to the Operations and Sales departments



Thanks Guru's,
Prazval.ks




Projects&Content Management in Tableau Server

Creating Projects&Moving the Content in TableauServer:-
   Create 2  projects for following departments:
     Operations and Sales.

  • --Create a Data Sources Project. This project will act as a repository for           the data sources to be shared among the departments.
  • --Move the following pieces of content found in the “default” project:
1.  The “dtreeviews” workbook belongs to the Operations      Department
2. The “NewsArticle” workbook belongs to the Sales Department
3.The “Superstore” data source belongs to the Data Sources  Project.



Steps:-
1.    Login as the Admin User,Click on  Content section and the Projects subsection of the toolbar

2.    Click the “+ New Project” button
      3.Enter project name as– Sales Project and description as– 
      4.This project will hold all of the content related to the Sales department.
      5.Click the “New Project” button



6.    Repeat steps 2-4 for the Operations Project and the Data Sources Project

7.    While still in the Content section, click the “default” project to find the desired workbooks and data sources
8.    Find the first workbook: “dtreeviews” and click the top-left corner of the workbook to select it
9.    Click the “…” button to bring up the available options that you can apply to the “dtreeviews” workbook
10. Select the “Move” option


11.    Select the “Operations Project” from the list
12.    Click the “Move” button


13.    Repeat steps 8-12  for the “NewsArticle” workbook (Remember: “NewsArticle” belongs to the Sales department”)
14.   In the “default” project, select the “Data Sources” tab


15.    Select the “Superstore” data source
16.    Click the “…” button to bring up the available options that you can apply to      the “Superstore” data source
17.    Select the “Move” option


18.    Select the “Data Sources Project” from the list
19.    Click the “Move” button



Thanks Guru's,
Prazval.ks





Saturday 27 February 2016

Finding No Of Work Hours

Challenge:-
Find the number of work hours between the Order Date and Ship Date. Assume a consistent 8 hour work day



Solution:-


1.Create a Calculated Field with name “Work Hours”  and enter in the following:.


This calculation may appear confusing, so let’s break this down .
 The first line in the calculation returns to us the total number of hours between our Order Date and Ship Date. Since we are assuming an 8 hour work day, we are NOT working 16 hours a day.

From our total difference in hours, we will now subtract the number of days times 16. This represents the total number of hours per day we are not working, so we will subtract this from the total number of hours between our dates.

Lastly, we still must account for the weekends, since we do not work at all during Saturday and Sunday. Using the same logic to isolate the weekends, we subtract 16 for every weekend that we have. This is because we have already subtracted the non-working hours for each day, we just need to account for 8 hours on Saturday and 8 hours on Sunday that we are not working.

2.Drag OrderID,Order Date and Ship Date into Rows.
3.Right-click on the Order Date&Ship Date on the Rows shelf. Select Exact Date and make it Discrete.



4.Drag “Work Hours” and drop into Columns Shelf.



Thanks Guru's,
Prazval.ks

Sunday 21 February 2016

Combining Seperate Rows into Single Row List

Challenge:-
Using the Hollywood Stories data source(Click to download), instead of listing the genres that a studio produces as separate rows, combine them into a comma separated list as a single row as shown below.
      
The challenge is to get multiple rows of data into a single row.

Concept:-
To do this, we need to use a table calculation to take the previous genre and line them up.  The function PREVIOUS_VALUE can be used to iteratively take the previous value and line it up with the current value.

Steps:-
1.Create a Calculated Field with name List with Comma and enter the following formula
This calculation is checking whether the index is 1(or) not.If it is 1,then first genre is listed. 
In the picture below, since Drama is the first genre listed under 20th Century Fox, the genre Drama is returned
If the index of a genre is not equal to 1, then the calculation is referring to all other rows except first row, and will take the previous value,which would be the genre from the previous row, separated by a comma, followed by the current genre. 
Drag and drop List with Comma calculated field to Text on the Marks card, our view will look like this:


This is  computing using Table (Down) which refers to the all of the studios in the table. 
But we want for each studio, so we want to change how it is being computed.

2.Right-click on  List with Comma field on Marks card, and  Select Compute Using and then Pane (Down).

3.Drag LeadStudio,Genre into Rows

4.Right Click on Genre and uncheck show header.


5.Create a Calculated Field  "Filter", with the following formula:

This rank will take all the string  values in  List with Comma field and computes rank.
 It means longest string will be ranked the highest.

6.Drop Filter in between Lead Studio,Genre and convert it to Discrete.


7.Right-click on Filter in the Rows shelf and select Compute Using > Pane (Down)

Now the RANK calculation will be computed based for every pane, which in this case, for every Lead Studio. 
  Now we can see that the row within the pane that has the longest string value is ranked as 1.

8.Drag  Filter field onto the Filters shelf and only select 1.

This selection allows us to only show  the line if the rank is 1.

Create Calculated Field "Color" &Drop onto the Color shelf, 
so we can clearly see which studios produce movies of more than one genre.

Finally  returns us a single comma separated line for each studio in our data set.


Thanks Guru's,
Prazval.ks


Wednesday 17 February 2016

Finding No Of working days

Challenge:-
Show the number of days between each order’s Order Date and Ship Date, not including the weekends. In other words, show the count of work days between these two dates

Solution:-

1.    Drag Order Number,Order Date,Shipdate to the Rows Shelf.
2.    Right-click drag Order Date and select MDY(Order Date).
3.    Right-click drag Ship Date and select MDY(Ship Date).



4.     Create Calculated Field " Work Days", and put the following into the body of the calculation:




Since we want the total number of days between our Order Date and Ship Date, we will use the date part ‘day’ to get the total days between our dates. The first line of our equation successfully accomplishes this, but that does not account properly for non-work days (weekends). The second part of the equation counts the total weeks between our Order Date and Shipping Date,utilizes the optional anchor date to set the start of the week to Monday. This looks at the Shipping Date compared to the Monday of the week that the order was placed. 
For Example,If our Order Date was Wednesday, Feb 17th, and our Shipping Date was Monday, Feb 22nd, a weekend has occurred; however, a whole week has not completed. But since we are comparing the Shipping Date to the Monday of whatever week the Order Date falls on, we are now comparing Monday, Feb 22nd to Monday, Feb 29th, and the ‘week’ difference is now one. We then account for both weekend days by multiplying the total number of weeks between our dates by 2, and subtract this amount from our total days.

5.     Drag Work Days to the Columns shelf.
6.    Change the Marks Type to Bar and Click on ‘Abc’ in toolbar


Now, we see the correct count of days that our products took to ship:


Thanks Guru's,
Prazval.ks





Identifying Customers Purchasing Behaviour Based on first Purchase(Whether it is small(or) Large)


Challenge:-
What type of customers is most likely to make repeat purchases – small first purchase or large first purchase?.

Solution:-

Create following 3 Calculated Fields:
          1.


2.


3.

Build the View:
1. First purchase bins on rows.
2. Multiple purchase? On columns.
3. Count distinct of customer name on columns.
4. Right click count distinct of customer name -> quick table calculation -> percent of total
    a.Make sure the compute using is table across.

prazval







Thanks Guru's,
Prazval.ks

DAX Time Intelligence Functions

   Thanks Guru's, Prazval.Ks