5 Replies Latest reply on Aug 29, 2018 10:26 PM by Tushar More

# How to display/compare a school data in column 1 and the school regional data in column 2

Hello,

I would like to calculate (TeacherNumber/studentNumber%) for a school in column 1 and for 'school region' in column 2.  Any ideal how to run this report in Tableau? Thank you.

Report is like this:

(end)

• ###### 1. Re: How to display/compare a school data in column 1 and the school regional data in column 2

Hi,

Create below calculated fields.

Teacher/Student ratio:

I am not sure how you are deriving school region.

~Tushar

• ###### 2. Re: How to display/compare a school data in column 1 and the school regional data in column 2

Hi!!

I've attached a workbook with my solution. I used a level of detail expression in a calculated field to produce a measure showing the ratio of teachers to students, but comparing only at the region level. Let me know how you go!!

Thanks,

Sam.

• ###### 3. Re: How to display/compare a school data in column 1 and the school regional data in column 2

Hi,

You can try this,

School:

{FIXED [School Name]:SUM([Teacher Total])}/{FIXED [School Name]:SUM([Student Total])}

School Region:

{FIXED [School Region]:SUM([Teacher Total])}/{FIXED [School Region]:SUM([Student Total])}

Let us know if this help.

Mahfooj

• ###### 4. Re: How to display/compare a school data in column 1 and the school regional data in column 2

Tushar your School Region calculation has some issue. Take a look the expected output once again!

• ###### 5. Re: How to display/compare a school data in column 1 and the school regional data in column 2

Thanks for pointing out . That's what I said when posted the solution

Here is the updated one.