12 Replies Latest reply on Oct 4, 2017 12:04 AM by ankit.ravi

# Ratio between 2 rows from the same dimension using the same measure

I want to find ratio  between 2 rows from the same dimension. I have attached a sample workbook below. I tried using if else to get this but was unsuccessful in achieving the goal.

In my case I have many unique rows and would like to have a way where I can look at the ratio and difference between 2 unique rows.

Please do let me know if I need to provide any additional information to solve the problem.

Thanks in advance.

• ###### 1. Re: Ratio, Difference between 2 rows from the same dimension using the same measure

Hi Ankit

I'm sorry I don't udnerstand the request.

Could you clarify the expected formula and results with using real calculation with sample data?

In my case I have many unique rows and would like to have a way where I can look at the ratio and difference between 2 unique rows. Thanks,

Shin

• ###### 2. Re: Ratio, Difference between 2 rows from the same dimension using the same measure

Sure, For example in my case I have a dimension which has many unique rows/fields like A,B,C,D,E,F,G and so on.. I am want to find the ratio and difference between any two rows based on some requirements. In the sample data I have A and B from the dimension.

I hope this helps.

• ###### 3. Re: Ratio, Difference between 2 rows from the same dimension using the same measure

I still don't understand.

Provide me with exact calculation you need using sample data.

2/20

3/30

4/40

or

20/30

40/30

Which ratio do you need and which comparison are you talking about?

Shin

• ###### 4. Re: Ratio, Difference between 2 rows from the same dimension using the same measure

2/20. A quick question, will the approach be any different if it's 20/2?

On Oct 3, 2017 18:38, "Shinichiro Murakami" <tableaucommunity@tableau.com>

• ###### 5. Re: Ratio, Difference between 2 rows from the same dimension using the same measure

GIVE ME EXACT CALCULATION AND EXPECTED RESULT PLEASE.

SHIN

• ###### 6. Re: Ratio, Difference between 2 rows from the same dimension using the same measure

2/20=0.1

On Oct 3, 2017 18:46, "Shinichiro Murakami" <tableaucommunity@tableau.com>

• ###### 7. Re: Ratio, Difference between 2 rows from the same dimension using the same measure

I hope you got it.

On Oct 3, 2017 18:46, "Shinichiro Murakami" <tableaucommunity@tableau.com>

• ###### 8. Re: Ratio, Difference between 2 rows from the same dimension using the same measure

Ankit,

I am sorry.

I gave up this communication..

Thanks,

Shin

• ###### 9. Re: Ratio, Difference between 2 rows from the same dimension using the same measure

Hey Shin, I am sorry for the misinformation. I gave you all the info. I have also attached an excel sheet with o/p that I desire to have. I hope that will help.

Again sorry for the lack of information.

Thanks

• ###### 10. Re: Ratio, Difference between 2 rows from the same dimension using the same measure

Hi Ankit,

Check the attached TWBX file and see if it meets your requirement.

Other option is to un-pivot the data set to have Dim A and B as separate columns.

Thanks,

Vivek

• ###### 11. Re: Ratio, Difference between 2 rows from the same dimension using the same measure

would like to have a way where I can look at the ratio and difference between 2 unique rows.

Please explain this statement with the expected formula and real value result with using you sample number. Thanks,

Shin

• ###### 12. Re: Ratio between 2 rows from the same dimension using the same measure

Changed me question. Don't need the difference part. I just want to compare how what ratio of 1 row is the other.