Wednesday, 18 July 2018

Top4 Items in a Sentence

Using the Superstore dataset, create a chart which finds your 4 top-selling SubCategories and returns them in a sentence as below.


"Your top-selling sub-category is (Top Sub-Category),next (2nd Sub-Category).. (3rd Sub-Category) and (4th Sub-Category)


Step1:-
Drag [Sub-Category] to the Rows shelf.
Step2:-
Create a calculation with following formula to find  top-selling sub-category and name the calculated field as [Top Sub-Category].

IF RANK(SUM([Sales])) = 1 THEN MIN([Sub-Category]) END

Drag the above calculated field into Label of the Marks Card.

This calculated Field  will return the name of the  sub-category for that row containing the sub-category.

Step3:-

To get sub-category in every row,create a calculated field with name [Top1] and 

with following formula.

WINDOW_MAX([Top Sub-Category])


Step4:-
Repeat steps 2 and 3 for 2nd,3rd and 4th best sub-categories.
The RANK for 2nd,3rd,4th Best Sub-Categories  should equal to 2,3,4 respectively, instead of 1.
Take WINDOW_MAX on 2nd,3rd,4th  Best Sub-Categories.
Name  final calcs as [Top2],[Top3] and [Top4].

Step5:-
Drag the [Top1],[Top2],[Top3],[Top4] Calc fields into the label of the marks card and remove remaining fields.
Step6:-
Edit the text in the following way.
Click the Text shelf and click the "..." to the right of the text. 



Step7:-

Right Click on  the Sub-Category on Rows Shelf and un-select "Show Header".

Step8:-
To Show in 1 sentence in a single row create a calculated field with the formula "INDEX()=1" ,Drag it into Filters and select "True".

Thanks Guru's,
Prazval.ks

Tuesday, 12 December 2017

Formatting Tips

Hello Gurus,
One of the common things in Tableau after building any visualization is performing formatting.
The Structured way of doing is performing formatting at 
different levels in the following order.
1.At Default Properties level
2.At Workbook level
3.At Sheet level
4.Individual  Fields,Axis,Headers,Annotations etc

1.Default Properties level:
If we are formatting any visualization always it is recommended to set the common things at the default properties level like default color,sorting,workbook themes etc.

2.At Workbook Level:-
Second level perform formatting is at the workbook level like setting font sizes,types,alignment,lines etc for entire workbook.



3.At Worksheet level:-

Next Perform formatting at the worksheet level



4.At Individual Fields level:-
Next Perform Formatting at the individual fields,Axis,Header level,by right clicking on any field and select format.




Finally the formatting applied on 1 sheet can be copied to multiple sheets by using copy formatting option,if we use same formatting across multiple sheets and it saves time!!



Thanks Guru's,
Prazval.ks



Tuesday, 21 November 2017

RStudio Interface



R Studio Interface:-


v  Terms
v  Console
o   Keeps a record of commands issued
o   Error messages appear here
o   Can type code here directly for quick feedback
v  New
o   Create a new R script
v  Editor
o   Where to write code for re-use
o   Best place to write code
v  Run Button
o   Allows you to select and run chunks of code from the Editor 
o   To use: Highlight Code in editor, select "Run" (or Ctrl + Enter)
v  Environment
o   See all variables or data sets you have saved
o   Click on a variable to get more information about it
v  Plots
o   History of any plots created
o   Type plot(1:10) to see a basic plot
v  Help
o   More information about any function you would like to use
v  Packages
o   List of additional sets of functions to bring into work space

o   Where to select, install, or update packages

Wednesday, 15 November 2017

Top City Per State

For Each state display the city name having  highest sales.

Step 1:
Create 3 calculated fields 
1.City Sales   2.Top City Sales     3.Top City Name   by below formulas.




Step 2:
Double click on state geographic dimension, select filled map in marks card shelf, drag and drop “Sales” measure on color, label of the marks card and drag and drop “Top City Name” calculated field on label of the marks card.



Thanks Guru's,
Prazval.ks

Monday, 23 October 2017

Unique Customer Count

Hello Gurus,
Lets Discuss one common challenge in these days of finding unique Customers purchased in the specific time frame.
Let's do the challenge.
For each month, how many unique customers have purchased in the last six months?

Step 1:
Create  3 calculated fields “6 Months Buffer”, “Index=1”, “Rolling CountD”  by below formulas.




Step 2:
Drag and drop “Order Date” date dimension field into columns shelf and change format as discrete date part “Month/Year”.


Step 3:
Drag and drop “Rolling CountD” calculated field into rows shelf, right click on “Rolling CountD” field, click on edit table calculation and select specific dimension as customer name.



Step 4:
Drag and drop “Index=1” calculated field into filters shelf, select “True” and make sure addressing as customer name.

Step 5:
Drag and drop “Customer Name” field on details of marks card.


Thanks Gurus,
Prazval.ks

Saturday, 19 August 2017

Count of A's in Each Customer’s Name

How many A's does each Customer have in their name(On Superstore Data)?

Step 1:

Create  3 calculated fields “Cust Name WithOut A's”, “Name length”, and “Name Length WithOut A's”  by below formulas.



Step 2:
Create “Number of A’s” calculated field to find no of A’s in each and every player.










Step 3:
Drag and drop “Name” dimension field into rows shelf and “Number of A’s” measure field into columns shelf.

Thanks Guru's,
Prazval.ks

Saturday, 12 August 2017

Zipping the Tableau Server LogFiles

Tableau Server LogFiles can be backed up by  using TAB ADMIN.
It Creates an archive (.zip) containing Tableau Server log files.
If we have Clustered Environment,then log files from worker servers are included in the archive that's created.

Syntax:-

tabadmin ziplogs  <File-location>

DAX Time Intelligence Functions

   Thanks Guru's, Prazval.Ks