December 22, 2017

Show Sales Lines Based on Profit Condition of Latest Month




This post describes a solution on how to show sales lines by category that meet minimum profit condition based on latest month.  The problem is interesting in that you need to combine multiple Tableau concepts (Level of Details and Order of Operation) in order to get to the solution.  Many thanks to Shinichiro Murakami for his helpful contribution to find the solution.


The solution has to meet following two conditions (1) Minimum Profit Level and (2) Latest month.


First, create a calculated field to filter for the latest month.




Second, create another calculated field to show profit based on latest month.




Third, create another calculated field to filter for latest month profit that meets minimum profit level.




Since we want to show the sales line over a range of Order Date, this date range should be filtered first before the calculation for @Latest Month.  So add the MONTH(Order Date) filter to context which will make this filter have a higher order of operation.


Finally, since we want to show only sales lines that meet minimum profit condition on latest month, drag @Profit Condition Filter to Filters pane, change to Exclude Values and select Null.  This will exclude sales lines for categories that don’t meet profit condition and hide those sales lines.




May 19, 2017

2016 Arab Opinion Index




The 2016 Arab Opinion Index, published by the Arab Center for Research & Policy Studies in Doha, Qatar, is a public opinion survey across 12 Arab countries in the Middle East and North Africa.   The report provides insights into what Arab people think about democracy, economy, politics, religion, & ISIL.


This visualization presents what Arab people think about democracy.   In general, people have a positive opinion about democracy and more than 70% think it is a better form of government.   However, less than half of the respondents think their own country is ready for democracy.  Let's hope the people of these countries will have the governments with some forms of democracy as they desire.


April 21, 2017

Sheet Swapping for Bar Chart




This short & neat post describes an interesting solution on how to do sheet swapping for bar chart.


Scenario:  Sheet swapping doesn’t work well with bar chart. One of the worksheets doesn’t automatically reduce in size when the parameter value is not selected.


Fortunately, there’s a work-around solution for this problem.


Solution:  Insert a ‘NULL’ calculated field in the Rows pane of both worksheets. This should fix the problem and sheet swapping can be used with bar charts again.



March 17, 2017

Unauthorized Immigration



Dealing with unauthorized immigration is one of the key policy issues in the Trump administration, which has prioritized that unauthorized residents are not welcome in the US.  This policy has two main components (1) stopping illegal border crossing by building a wall and (2) deporting unauthorized residents already in the US who have committed any crimes.


This visualization analyzes and provides a composite picture of the unauthorized immigration.  The issue is emotionally complicated but let’s hope that the new administration will find the right balance between law enforcement and compassion for outsiders soon.



January 6, 2017

World Giving Index




Let’s start 2017 with an inspiring topic of philanthropy.  Every year, the London-based Charities Aid Foundation publishes the global-thematic World Giving Index report, which tracks the generosity of the countries’ inhabitants around the world.  The three giving behaviors used to measure the inhabitants' generosity are (1) Donate money to a good cause, (2) Help a stranger, and (3) Volunteer time.


Each giving behavior yields a score that counts the percentage of the country's inhabitants who participated in that behavior.  Then the World Giving Index is a combination of the scores of the three giving behaviors.  For 2016, Myanmar, the United States, and Australia are the top three most generous countries according to the World Giving Index.  Here’s to many more unconditional and happy givings.  Cheers!