1 Reply Latest reply on Jun 19, 2018 7:53 PM by swaroop.gantela

    Two measures, one subset of another, show as percentage

    Lee Yang

      I'm looking at a reconciliation of two datasets that should have the same information.  Dataset A is the primary while we want to probe how accurate dataset B is.

       

      The first measure is Sum Amount of dataset A.  The second measure is sum of matched amount, where records found in both datasets are included, else excluded. 

       

      The dataset has ten line of business (LOB) categories such that:

       

      LOB1:    45MN/47MN  ---> means 47MN is the sum amount in dataset A and 45MN is what was matched between A and B.

       

      The data source for tableau has three columns:  LOB category, original amount, and matched amount where the first is a dimension and the last two are measures.

       

      I am trying to show a stacked bar graph with X-axis 0%-100% that has the original amount as 100%, such that bars for all ten LOBs are the same length, and the secondary color for any bar shows the matched percentage of original.  For the example provided above, 45MN out of 47MN is 96%, so 96% of the bar is one color and 4% is another color.

       

      Methods attempted thus far:

      Putting measure names in the color mark to show stacked bar, but this just added 45MN on top of 47MN, creating two colors when combined shows 92MN

      Putting original amount measure in the columns and choosing "calculated percent of total" - this put all ten LOBs on bars of the exact same length, but can't bring in matched amount