Please find my approach
1) Changed your % Difference (based on previous year) calc to be:
(ZN(SUM([Population])) - LOOKUP(ZN(SUM([Population])), -1)) / ABS(LOOKUP(ZN(SUM([Population])), -1))
2) Set the Compute Using for this % Difference Calc appropriately:
3) With YEAR on the filter shelf, you could not get accurate results since only one year was available to the calculation. So, moving YEAR(Date) to the Pages shelf, which gives us the ability to "page through" the years and see the resulting values. Version 8.1 Workbook is attached. Note that 2010 will show all NULL values, since there is no previous year. We could set this up to calculate the change from 2010 for each year as well. I set up a separate calculation for this in the attached workbook, and created a sheet for each version.
Thanks for responding. Unfortunately, I really do not understand your response, including item 2 where you show a map and states as I currently have no geo information in my file. I have gone ahead and attached the Inequality Excel file as basis for my project. Again, you will see the first column represents all of the years with the corresponding columns for top 10% income, bottom 90% income, gini coefficient, household income, etc. as reported for each of these years. So it is true time series data. If you can better orient your response, specifically to the data here, and how it can help me construct a treemap that would be very much appreciated. I also will want to construct a geo map; maybe use a US map with slider showing share of US household, each year changing, by ratio of bottom 90% to top 1%. However, I would need help on how to construct that.
Again, I am relatively new to Tableau. I appreciate you having patience with me.
Inequality.xlsx 39.6 KB
Hi again Shaik,
I attempted to create the treemap using my data and attached the result. There are no labels showing. However, I can click on a cell and shows year and bottom 10, top 10 in that particular cell (year is only dimension and bottom 90%, top 10% as two measures. Perhaps you can provide input, first if these are correct categories, based on my data and how to get labels. Maybe there is a way to add the calculated value to create categories, and show a real treemap, as I think you were getting at with your original response. Again, I am new at learning Tableau.
treemap_no_labels.jpg 207.0 KB
Appears I got the issue resolved on producing a treemap as I created a new measure of discrete values. I will work to get it perfected.
However, as you also appear to be an SME with geo mapping, I have a different question for you. I would like to construct a geo map, also related to US Income Inequality, but only with modifying my current excel file. Also, again this is time series driven data. I would like to construct a geomap, that for each of my years, would show the three top states at the high 10% income level as well as the three highest states at the bottom 90% income level. So am considering modifying my Excel data to add columns as follows (with year already in the database):
Year State1 (high 10% income) State2 (10% income) State3 (10% income) State4 (high 90% bottom income) State5 (90% bottom) State6 (90% bottom)
2010 California $580,000 Illinois $565,000 Texas $555,000 Missouri $64,000 Florida $62,000 Minnesota $59,000
2011 New York $620,000 California $605,000 Illinois $600,000 Massachusetts $65,000 Minnesota $63,000 Colorado $62,500
2012 California $645,000 New York $640,000 Maryland $635,000 Iowa $67,000
Colorado $65,000 Arizona $64,000
So the geo map, for the year I display in the indicator would show these six states including income amounts. In addition, I would like to apply coloring so say three highest at 10% highest income are shaded in green (from dark to light) and three at bottom 90% are shaded in orange (from dark to lightest, again in order of income amount.
Is it possible to construct such a geo map and just by my modifying, adding the columns I have noted? Just was not sure.