Skip to main content

Life Hack by Comparative analysis in Tableau

What to do when there are 10 indicators and all of them should be analysed in dynamics and we need to avoid the scenario when dashboard is overloaded with a huge flow of information? Build 10 graphs with trend lines for each of the metrics? Hmm, it's cumbersome. Maybe, show all metrics on the same chart? I guess no because what if some indicators measured in percent, while others are measured in absolute equivalent?

One of the life hack which I often use in my job is creation of two sets of parameters.

Example

There are  three metrics each of them has two bars: dark and light blue bars. Dark blue bar indicates the value of metric as of 31 of March and  Light blue as of 13 of August. Dotted line indicates Benchmark (target value).
Pluses of approach:
  • We can manage which periods to compare up to days 
  • All metrics are automatically recalculated depending on the values of the selected periods
  • Easy to understand format of visualisation


How to make Comparative analysis in Tableau?

Step 1
Create set of parameter
  • Period 1 (Year)
  • Period 1 (Month)
  • Period 1 (Day)
 Example of Period 1 (Month). The same approach is for Year and Day parameters.
Step 2
Duplicate these parameters and rename it as 
  • Period 2 (Year)
  • Period 2 (Month)
  • Period 2 (Day)
Step 3
Create the following calculated fields:
 FY Year String = STR(DATEPART('year',DATEADD('month',-3,[Create Date]))+1)
 FY Month String = STR(DATEPART('month',DATEADD('month',-3,[Create Date])))
 FY Day String = STR(DATEPART('day',DATEADD('month',-3,[Create Date])))

Pay attention: The timeline is not tied for a calendar year, but for a financial one. In the example you can see that Fiscal Year starts from the April. 

If you do not have to convert your time line in the fiscal year, you need to use  the following calculations:
Year String = STR(DATEPART('year',[Create Date]))
Month String = STR(DATEPART('month',[Create Date]))
Day String = STR(DATEPART('day',[Create Date]))

Step 4
Bind the parameters to the created calculations:

FY Year Selection 1 = IF [Period1 (Year)]=[FY Year String] then [Create Date] else null end
FY Month Selection 1 =IF [Period1 (Month)]=[FY Month String] then [Create Date] else null end
FY Day Selection 1 = IF [Period1 (Day)]=[FY Day String] and [Period1 (Month)] =[FY Month String] and [Period1 (Year)]=[FY Year String] then [Create Date] else null end

Bind the same set of parameters for Period 2 (Year), Period 2 (Month), Period 2 (Day):
FY Year Selection 2 = IF [Period2 (Year)]=[FY Year String] then [Create Date] else null end
FY Month Selection 2 =IF [Period2 (Month)]=[FY Month String] then [Create Date] else null end
FY Day Selection 2 = IF [Period2 (Day)]=[FY Day String] and [Period2 (Month)] =[FY Month String] and [Period2 (Year)]=[FY Year String] then [Create Date] else null end

Step 5

Create calculation 'Metric 1 Selection' to fix the value of metric on the data, which you select on the block of parameters selection 1
Metric 1 Selection = if [Create Date]=[FY Month Selection 1]  and [Create Date]=[FY Month Selection 1] and [Create Date]=[FY Day Selection 1] THEN [Value] ELSE 0 END

Create 'Metric 2 Selection' in a similar way to fix the value of metric on the data, which you select on the block of parameters selection 2.

Step 6
Drag measure values Metric 1 Selection and Metric 2 Selection in the columns shelf. Click on one of the measure values and select dual axis, and then synchronise axis. 

Step 7
Play with size of bar charts and drag measure names field into a colour mark, in order to divide Metric 1 Selection and Metric 2 Selection by colours.








Comments

  1. thanks for sharing this hack by Comparative analysis in Tableau. It is really very helpful. Tableau Rest API Connection

    ReplyDelete
  2. Dashboards are a proven system for businesses as it helps them to consume the big data clearly so as to make fact-based decisions. Business users need not rely on their mere gut instincts. Inetsoft.com

    ReplyDelete
  3. This is an affiliate web site, if you make a deposit with a on line casino we earn a fee. To make things even more difficult, access to many overseas on-line e-wallets are banned or severely restricted for South Koreans. Even some of the well-liked playing e-wallets, PayPal has a unique operation for Koreans that include some strict restrictions – like you are not allowed to transfer funds to non-Korean PayPal accounts. For occasion, players in South Korea who win something on the local lottery are subject to playing taxes of something between 22% and 30%. It’s a lot of money cash} to lose, which is clearly 온라인 카지노 frustrating for South Koreans.

    ReplyDelete

Post a Comment

Popular posts from this blog

Performance Troubleshooting: Tabular Model in Power BI

For the last 2 years, I have been using Power BI as one of the core tools to provide different data insights for the top management.  Together with my great team, I was constantly improving our key reporting tools. As in a classical way we were facing problems with the performance. The rising complexity reflects on the user's response and on the stability of report updates. The Tabular model allows boosting both the performance and the speed of development of massive reports with complicated data models and too many DAX.   Let us consider the use case and different ways of improving report performance including usage of the Tabular model. About DataSet:   Classical OLAP schema - Snowflake  Size of fact table - over 40 mln rows Over 40 dimensional tables Data Connectivity Mode - Import Type of Connector - SQL Server Database The report was hosted in Power BI Report Server.  Ways of investigation and steps to improve the performance: Migrate report from on-premise PBI RS to the Cloud

Top the fastest growing companies in the United States

Hi there, I was lucky to work with  such BI tool as Tableau for some time and here I would like to share with you my experience in Tableau features and data preparation. Here is presented comparison analytics by US states. DataSource The first data set I took from Tableau Sample Data Sets . My datasource contains some data by top fastest growing private companies in the United States: revenue, number of  workers, info by location and so on.  The larger amount of data, the more you can make various analysis of data set. I was wondering about: Where are the most successfull companies accumulated? How much is dispersion between states in a matter of number of employees and profit among states? Which industries are most developed in different states? 'How to use' and Description of Dashboard Box plot allows to see the median and outlier or in other words who is the outsider or leader in terms of profitability by states. To see which industries have succe

Transforming data into action in Healthcare sector

Transforming data into action allows to save the lives of people. Occasionally a simple report that you can do by a couple of hours can become a powerfull tool for raising important problems and determining the course of action. So it happened with the malaria's data by Zambia. I can not turn a blind eye to the world's problem (especially when it's related to the life of children) so I've decided to create a report. The more we talk about it, the more chance to draw attention to this problem - there is more chance to save children's lives and hope for the future.  Data analysis is a sort of journalistic investigation in the course of which you can find a lot of interesting facts. This topic is not an exception and that's what I've find out: Eight visionary companies created a stack of technology solutions that allowed health workers  quickly access reliable data and make informed decisions  Since 2014 malaria starts rapidly decrease aft