August 26, 2017 by
Hi All, In this blog of Tableau tips I will discuss how to highlight the top and bottom in a chart . Often we come across scenarios when we have to show the maximum and minimum value in our chart view . Let us consider our superstore data. If some one asks us to show the sales across the months for the complete data set its quite easy. We can easily construct a bar chart showing us the sales across all the months . These bars by default would be same in color ( until we apply some coloring scheme). What if we are asked to show the bar corresponding to the month with highest sales as Green , the month corresponding to lowest month as Red and all other as Blue. To do this we will would use the Window_Max and Window_Min function to identify the months with max and min sales respectively to create a calculated field. Lets get going and see how we achieve it: Step 1: The first step would be to create a view to show the sales across months. To do this drag the Order Date into the Columns Mark . Right click on the Order Date and select Month that appears second in the drop down. Drag sales to the Rows and select the marks as Bar. Your screen should look like this : Step 2: To identify the minimum and maximum selling month create a calculated field High Low as  under : This calculated field compares each month  sales value to the windows maximum ( maximum sales across all months ) and the windows minimum sales ( minimum sales across all months ) and assigns the value Max if the sales is equal to windows maximum and Min if sales is equal to windows minimum sales. Step 3: Place the created field High Low on the color marks and there you go . Our bars are now colored differently for the maximum and minimum selling months. You view should be somewhat like this: Here we see that the highest sales corresponds to Nov 2017 ( Green ) and lowest sales corresponds to February 2014. For more Tableau Blogs visit my website http://www.vizzingdata.com/

August 1, 2017 by
Data Visualisation has never been easier, all thanks to Tableau. Give a read to my comprehensive blog on the same and explore the horizons you have never before : https://www.analyticsvidhya.com/blog/2017/07/data-visualisation-made-easy/

July 25, 2017 by
Hi All, Today I will show you an effective way of changing the measures and dimensions in a chart using parameter. Consider the following scenario . You have a chart that shows profit across the Sub Categories in the Superstore data. Now we would like to bring Sales in measure and Region in Dimension. Instead of going to the worksheet and changing the measures and dimension we would control the measures and dimension of the chart in the dashboard using Parameters. The following image would make the context clear : Here we see two dropdowns , one for the selection of dimension and other for the selection of Measure . The chart which has the current state of Profit across Sub Categories , would change the state with respect to the selection. For example if we select the Dimension to be Region and Measure to be Sales from the dropdown we would get the following : So lets get started and try to create this with the help of parameters. Step 1: Create a parameter “Select Dimension” for the selection of Dimension . We will consider Category , Sub-Category , Region and Segment inthis case. Step 2: Create a parameter “Select Measure” for the selection of Measure . We will consider the two measures Sales and Profit. Step 3: Create a calculated feild for Dimesion that would pass the values of the dimension parameter when selected. Step 4: Create a calculated feild for Measure that will pass the value of the measure parameter when selected. Drag Dimesion to Rows and Measures to column . Click on the two parameters we have created and from the drop down select show parameter control. Now change the value of measure and dimension from the dropdown and your chart would update automatically. Hope you guys enjoyed it. Subscribe to my mailinglist at : http://www.vizzingdata.com/ to learn Tableau from basics

July 14, 2017 by
The Women's March was a worldwide protest on January 21, 2017, to advocate legislation and policies regarding human rights and other issues, including women's rights, immigration reform, healthcare reform, reproductive rights, the natural environment, LGBTQ rights, racial equality, freedom of religion, and workers' rights. For demonstrating the use case for descriptive analysis on text data, we extracted the data of speech transcripts of multiple speakers of Women's March. The speakers include Angela Davis, Madonna, Gloria Steinem, Ashley Judd, and America Ferrera. We cleaned the data set by removing stop words, fixing normalization of keywords, and performed tokenization. The free flowing text tokens were then aggregated, linked together and run through our theme, sentiment and tone detection in order to unearth insights with respect to different speakers. For theme and sentiment detection, we used IBM Watson that takes the text as input and outputs the tone and sentiment of the text. All of the derived data was then intermingled together with the real domain knowledge. Contexts from their speeches, their themes, and keywords used were checked in other datasets such as twitter, news postings etc. In short, the following process represents the analysis flow: 1. Dataset Curation 2. Dataset Cleaning 3. Text Tokenization 4. Token Normalisation and Aggregation 5. Theme, Sentiment and Tone Detection 6. Contextual Insights using Business Analysis 7. Domain Knowledge Insights Here are the results: The overview: The term “Trump” was directly mentioned by his name in the speeches of Angela, Gloria, and Ashley in contrast to speeches of Madonna and Ferrara where “president” keyword was used to refer Donald Trump. The term “People” was used mostly by all the women, the Phrases include: "It is not - I the president, It is - We, the people (repeated thrice in Ferrera’s speech)" "Freedom struggles of black people", "Resistance to attacks on disabled people", and "Danger faced by marginalised people" Context of “I” vs “We” The term "I" was mentioned in the following statements: “I'm angry. Yes, I am outraged”- Madonna, "I am deeply honored to march with you today"- America Ferrera, “I am a nasty woman. I'm as nasty as a man who looks like he bathes in Cheetos dust”-Ashley Judd "We" was mentioned in these statements: “We dedicate ourselves to collective resistance”- Angela Davis, “We choose love. We choose love. We choose love”-Madonna, “We are here and around the world for a deep democracy that says we will not be quiet, we will not be controlled, we will work for the world in which all countries are connected”-Gloria Steinem, “We are America”- America Ferrera Top Common Themes: Main themes observed from the speeches are - Racism, Immigration, Religion and Women's Rights. The general sentiment and tone associated with these themes are negative (specifically sadness & anger on the current situation of Muslims, Immigrants, Blacks, and Women). Top Observed Tones and Personality Trait: From the overall analysis - Sadness, Disgust, and Fear are the top three observed emotional tones. Openness was observed as the major personality trait. Here is the analysis speaker by speaker 1. Angela Davis: Top Quote: “The next 1,459 days of the Trump administration will be 1,459 days of resistance.” Her top themes expressed in the speech are - Racism & Slavery, Human Rights, Violence, Religion & Immigration, Liberalism. “Resistance” was the most used word by Angela in her speech. Her top personality trait observed from the speech was “Conscientiousness” (Acting in a thoughtful way). Context - Angela Davis appealed for "Collective Resistance": Resistance to the attacks on Muslims and on immigrants, disabled people etc..She called out Trump administration will be 1,459 days of resistance Overall Sentiment - Negative (Disgust and Sadness as the emotional tone) Top Positive Words Used: ‘supremacy', 'united', 'freedom', 'rising', 'celebrate', 'thank', Top Negative Words Used: ‘murder', 'worse', 'dying', 'demands', 'attacks', 'resistance', 'struggles', 2. Madonna Top Quote by Madonna: “Welcome to the revolution of love. To the rebellion. To our refusal as women to accept this new age of tyranny. ” Her top themes expressed in the speech are -Love, White House, Unity, Tyranny. “Love” was the most used word by Madonna in her speech of total 5:10 minutes and 358 words. Her observed personality trait from the speech was also “Conscientiousness” which means - The tendency to act in an organised or thoughtful way. Context - Madonna appealed people to not fall into despair and choose Love Overall Sentiment - Positive ( -0.05 in the range of -1 to +1) Top Positive Words Used: ‘hallmark', 'good', 'right' Top Negative Words Used: ‘false', 'danger', 'refusal', 'fuck', 'shake', 'awful' Most observed Emotional Tone: Anger, likely due to her mentions most negative mentions on “White House” Top Madonna’s Tweets about the rally - Yesterday's Rally was an amazing and beautiful experience. I came and performed Express Yourself and that's exactly - Express Yourself...............So you can Respect Yourself. On Stage at the Women's March In D.C. - With My Girl Amy at the Women's March in D.C. We Go Hard or We Go Home. To view the analysis of other speakers, please share your email id. We will be happy to email it. Feel free to share your views in the comments section. :)

July 6, 2017 by
Original post: https://nikkiyu.co/2017/06/21/how-to-create-a-yoy-line-graph-in-tableau/ Line graph is simple, neat and one of the most popular charts that I use in my work. Today, I want to create a line graph to compare daily revenue with the same day last year. The challenge is that Tableau does not have Month/Day date format. See below: I have been tried several ways. Now, I will show you the simplest way, which are only two steps. Step 1: Create a Month/Day field. This is actually not a date, but a string. Step 2: Drag Month/Day to Columns shelf, and Revenue (anything you want to compare) to Rows shelf. Graph type should be Line. Then drag YEAR(Date) to Color. It is basically done! Really simple huh?! This method also take care of 2/29/2016. You may see a gap between 2/28/2017 and 3/1/2017 because 2017 does not have 2/29. This is what we expect to see. Some people use Lookup function, which may have issue when we have different number of days between two years. For this graph in my work, we show year over year average based on rolling 7 day average, which uses a table calculation. I will show you how to do it by two steps as well. Step 1: Right click the field on Rows shelf, then select Add Table Calculation. Step 2: The Calculation Type is Moving Calculation. Summarize values using Average. Previous values should be 6 and next values should be 0 because I need rolling 7 days. Compute using Table (across) based on Month/Day because Month/Day is on Columns shelf. One more thing: by doing this, the line graph will show up until 6/26/2017 (Today is 6/21/2017) due to moving 7 days average table calculation. I would like to show data until yesterday (6/20/2017). We can use a Lookup function to control the end date. Drag Lookup Date function to Filters shelf. Select True. Then the line graph will be: Now, revenue year over year trend by rolling 7 day average is done!

July 6, 2017 by
Original Post: https://nikkiyu.co/2017/07/05/how-to-create-a-stacked-bar-chart-that-adds-up-to-100-in-tableau/ Bar chart is probably one of the simplest charts that every data analyst uses all the time. It is simple but very effective. I am working on a web traffic report, which needs to compare website visits by device category (desktop, mobile and tablet) over time. I think a stacked bar chart could be applied to this case. Instead of comparing total number of visits, I care more about the percentage of visits by device category. Today, I will show you how to create a stacked bar chart that adds up to 100% in Tableau. Step 1. Drag Date to column shelf. Make sure you choose Discrete Exact Date by right clicking Date on column shelf. Step 2. Drag Visits to row shelf. Graph type is Bar. Step 3. Drag Device Category to Color. Step 4. Instead of showing total visits comparison, I would like to present % of visits per device every day. Right click Sum(Visits) on Row shelf, then click Add Table Calculation. Calculation Type is Percentage of Total and Computing Using is Table (down). Step 5. Command (or Ctrl) + drag Sum(Visits) table calculation to Label mark in order to show the percentage of total visits per device on the stacked bar graph. It is done! The key to create a stacked bar chart that adds up to 100% is the usage of table calculation. Tableau provides powerful functions of table calculations and window calculations. I will show you more in my next blogs. https://nikkiyu.co/2017/07/05/how-to-create-a-stacked-bar-chart-that-adds-up-to-100-in-tableau/

June 28, 2017 by
Hello Everyone out there. This is the first in series of  my blog post "Visualising data in Tableau from Scratch". In the subsequent blog following this one I will discuss about the different chart types and when to use a certain chart type. The underlying data for all these would be the Sample Superstore data that is provided by Tableau. We will start with the default chart types and then slowly move to Advance Charting in tableau.  So let's roll our sleeves and get going. A bar chart is the most simple yet most powerful way of data representation. It is a pictorial representation of data (generally grouped), in the form of bars, where the length of bars are proportional to the measure of data . They can immediately convey comparative relationships as well as approximate numeric values.Bar charts are most effective while comparing data across dimensions. Bar Charts can be broadly divided into four major types : Horizontal/Vertical Bar Charts Grouped Bar Charts Stacked Bar Charts Segment Bar Chart  Lets look into each of these and see how we go around creating these in Tableau. Horizontal/Vertical Bar Charts: To create a horizontal/vertical bar chart in tableau we need one or more measure and zero or more dimension. To know more about measure and dimension check out my blog  here . For example in the superstore data we would like to see how our sales is distributed by Region , we would bring the Region dimension into columns and the sales in Rows. Adding region to the colors mark and sorting the sales gives us the following : At the very first look we see that the sales is maximum for West region and the least for Sout Region.   Grouped Bar Charts : These bar charts can be thought of a stacked bar chart , the only thing being we have unstacked them and put the bars side by side horizontally. Grouped bar charts are used when we are trying to see a measure across two dimensions, let's say we want to see how our sales of product segment are performing within region. To do this we bring Region and then Segment in Columns. We then bring our measure value sales in Rows and add Segment to the colour.   Stacked Bar Chart : The stacked bar chart is great for adding another level of detail inside of a horizontal bar chart. In Tableau this is created by adding other dimension to colour mars in the original bar chart we created at the starting of the post. To do this we bring Sales into Rows pill , Region into Columns pill and add our Segment dimension into Colors mark. Following is how a stacked bar chart looks in tableau : A stacked bar chart is very easy to visualize. We can easily see how the sales of Segments are across the different region.   Stacked Bar Chart in Percentage : This is a extension of a stacked bar chart in which each individual bar is split by Percentage of the dimension ( the value of the percentages sum up to 100 ). The base for creating this is a stacked bar chart. Once a stacked bar chart is created , we add a quick table calculation ( percentage of total ) to our measure . This is done by clicking on the Measures (Sales in our case) , selecting Quick table calculation and then percentage of total. The measure is then computed across Segment. Hold ctrl and drag this measure to the label to show the percentage values. This is how the chart looks like: Here we can easily see that the Corporate segment accounted for 47.3% of total sales in the central region.   Hope this article helps you. Comments are appreciated . Follow this space to see more exiting stuff coming forward. Thanks Rahul Singh

June 23, 2017 by
Let’s look at few insights related to social and digital media: - 22% of the world’s total population uses Facebook (Source) - Over 50 million businesses use Facebook Business Pages. (Source) - 2 million business use to Facebook for advertising (Source) - 88% of businesses with more than 100 employees use Twitter for marketing purposes (Source) - 38% organizations spend 20% more than their advertising budgets on social channels (Source) There is no doubt that social media is an essential driver for a brand’s success. However, not many brands are using analytics and data science to gain social media benefits. Even if they are using it, are not aware of key areas of analytics. In this article, I will talk about eight aspects in which brands can leverage social media analytics for their advantage. 1. 360 degrees Brand Tracking Brand tracking is the process of monitoring the presence of a brand - their activities, their competitor activities, consumer trends, customer behaviors etc.  across the entire social landscape. This cross-platform and in-depth monitoring of a brand provides invaluable insights which give them a competitive advantage as well as keeps them up-to-date with their audience needs. For example, using brand tracking, detailed data-driven insights can be used by the brands for an added advantage such as: What is the right platform, right time and right method to reach out to specific customers, How good is their promotional and offers strategy as compared to multiple competitors in same space. 2. Target Audience/Customer/Followers Analysis The audience is an integral part of a brand’s success. Audience analysis includes a deeper analysis of a brand’s followers, fans, and customers in different verticals such as audience engagement, audience sentiment, and audience influence etc. Audience analysis requires different sources of data such as social profiles, timelines, survey records, transactional records and demographics data. Audience analysis unearths insights related to segmentation, demographic, mindshare, sentiment, top questions, top needs, top queries and themes associated with the customer. 3. Content Analysis Content analysis of social media posts (such as tweets, posts, emails, blogs etc.) of a brand could provide myriad of recommendations and facts that will ensure higher engagement and traffic. For example, by using natural language processing and machine learning on historical, present and competitor data, one could suggest right keywords and hashtags, optimal length and post type (pic, video, link), best times to post, so that a brand would garner higher and effective response. 4. Influencers Identification - Global and Brand Specific Influencer analysis includes identification and ranking of celebrities and personalities across different dimensions such as - engagement rate, overall digital presence, followers acquisition and engagement rates. Influencers are important entities that share and endorses the brands and their products, analytics helps to segregate right influencers for right brands with associated insights. 5. Promoted Post-Detection Using classification models and sophisticated feature engineering techniques on the data of competitor social media posts, it can be predicted that which of the tweets or posts are promoted by a brand. Promoted post detection can help in demystifying competitor’s promotional, boosting and monetary strategies. By understanding these strategies, a brand looks closely into their own approaches and optimize the practices they follow. 6. Impression Burnout Optimization Advertisements are the key part of brand’s marketing strategies online, However, every posted advertisement is not completely effective, people start losing interest in an Ad with time. The likelihood of people clicking an ad decreases with time - this is called impression burnout. Analytics can help to optimize the features and content of an ad so that the burnout time of an ad is higher. Data Science can predict what is the true burnout period for an Ad, so that brand can either monetize the good ads and discard the bad ads. 7. Engagement Prediction ML models can be trained to predict what is the likely engagement of their posts, if a post is expected to gain higher engagements, a brand can promote it more, or vice versa - if a post is performing expected to perform too bad, they can either alter its content or completely discard it with a new post. 8. Cross Platform Correlation Analytics and Data Science can be used to identify which of the cross-platform variables are correlated with each other. For example, a restaurant in the US saw higher positive reviews on yelp.com when they started promoting personalized offers on Twitter. Another example is the increase in email opening rates of a brand when they initiated a social media sales across Facebook, Twitter, and Instagram. With the massive boom in social media interactions, brands have to identify right patterns using analytics and data science so that they can adopt a proactive and intelligent approach towards meaningful, significant social media success. Feel free to share your thoughts in the comments section and share this blog. :)