6 Replies Latest reply on Nov 27, 2018 9:58 AM by Amit M

# compare the difference of two rows to the difference of next column

Hi All,

I am trying to do very simple thing which i thought would be easy but, I am not able to get my results. In the given chart I am trying to do some color formatting.

The request is to compare the conversion rates for each row at that specific step to the other rows and use the color to show higher (green) vs lower (red) conversion rate. For example, if DG converts from <Lead Conversion Rate> to <contact conversion rate> at 40% and DGB converts at 50 % then the <contact conversion rate> bar for DGB would be green and for DG would be red. I'm open to other ways to show this. I want to create how well the row elements convert from one step to another both on the same chart.

Please find attached workbook in tableau 2018.3

• ###### 1. Re: compare the difference of two rows to the difference of next column

It confusing. Please post your calculation for conversion rate i.e 40% and 50%.

It would be helpful if you can tell which bar will be of red and green color for different scenarios.

• ###### 2. Re: compare the difference of two rows to the difference of next column

Hi, Amit

Can you mark which bar(s) should be green and which should be red in your sample data?

ZZ

• ###### 3. Re: compare the difference of two rows to the difference of next column

Just and addition to above. I have created the field called Diff_L-C(DG) which is a difference between Lead conversion rate and contact conversion rate for Marketing code DG as below and I don't know why but it is not giving me the exact difference.

I did this for all the marketing code but non of them is giving the exact difference. I thought of calculating these difference and then will compare these field to get the desire results but, unfortunately, I am stuck at 1st step it self. Calculations are present in the attached workbook in initial post.

Thanks,

Amit M

• ###### 4. Re: compare the difference of two rows to the difference of next column

Hi Zhouyi and Ombir,

the 40% and 50% i have taken just for an example. Basically the idea is to compare the difference between Leads conversion rate and contacts conversion rate of each Marketing code DG,DGB and MB, so in given example the yellow highlighted bar(DG) should be green, blue circle bar(MB) should be yellow and DGB bar should be red for contracts conversion rate matrices because the difference is 1.98,0.56 and 0.662.

Same I have to do between other matrics for all three marketing codes like.

between Contact Conversion Rate and Application Conversion rate

Between Applications Conversion rate and Enrollments conversion rate

Let me know if this can't be achieved in tableau and if you have any other suggestions to present this data

Thanks a lot.

• ###### 5. Re: compare the difference of two rows to the difference of next column

Hi, Amit

It need a bit of reshpae of your data as shown below, pivot the measures

And create two calculation fields as shown below, set up the table calculation

workbook attached for your reference.

Hope this helps

ZZ

• ###### 6. Re: compare the difference of two rows to the difference of next column

Thanks Zhouyi, you are awesome.  Thanks a lot.