1 2 Previous Next 16 Replies Latest reply on Aug 12, 2016 10:39 AM by Cole Wunderlich

    Bar Graph Help: Scale/Zoom x-axis, Transparent bars on combined y axis, Normalizing Data using aggregate measures

    Cole Wunderlich

      Hello All,


      I am brand new to tableau and am trying to recreate a graph I made in excel and then spice it up with tableau's versatility.  It is a bar chart with many (as in >1000) named groups on the x axis (in this case metabolites) and their intensities on the y axis.  So far I have ran into 3 major problems.


      1. How do you allow the user to zoom/scale the x-axis?

           For my analysis, it is both helpful to be able to zoom in on an area of the bar chart in both the x and y directions.  So far it appears the zoom tool only allows for zooming in the y direction if your x axis is composed of labels instead of numerics.


      2. How do you make one measure's color transparent when using a combined y axis? 

           I have two groups (plant phenotypes) each metabolite was measured in.  So basically I want to plot the abundance of a given metabolite in plant A and plant B on the same graph.  So far I have done this by dragging the pills representing the levels in A and the levels in B both onto the y axis.  This gives me the overlayed bar chart I want.  However, I would like to make group A's color 50% transparent, so you can still see the level in B when it is covered by A. When I go to adjust the transparency, however, it adjusts it for both A and B instead of just one of them.  I know you can individually edit the colors for each group, but there is no option to edit their transparencies that I can find.


      3. Normalizing non-aggregate data using an aggregate measure

           My final problem is more of a data transformation one.  For each metabolite (row) in my data, I have 6 columns with abundance measure measurements.  3 of these are replicate measurements of  the metabolite level in plant A, and the other three are replicate measurements in plant B.  So far I have created two computed measures that are the average of the 3 replicates for each plant type for a given metabolite/row (so plant A average, and plant B average).  What I would like to do is then normalize these averages by the average total value for each plant type.  In psuedo code for plant type A this looks like:  ([plant A sample 1]+[plant A sample 2]+[plant A sample 3])/3 = plant A average;  then to normalize:  plant A average/((sum([plant A sample 1])+sum([plant A sample 2])+sum([plant A sample 3]))/3) =  normalized plant A (%).  This value tells you how much each metabolite is contributing to the net sum of all metabolites on a % basis.  When I try to do this calculation in tableau, it yells at me for mixing aggregate and non-aggregate measures.  I know I'm doing this, but from my perspective it makes sense to do so and I cannot conceive of a way to aggregate my average values so that both of them are aggregates and tableau lets me do the calculation.  Any help with how to create this new normalized, calculated measure would be much appreciated.


      I have attached a workbook with a sample of my data to help you get a better understanding of what I'm going for.




      Ps. For the attached workbook, 'plant A' is denoted by WT and 'plant B' is denoted by ref3-3.

        1 2 Previous Next