How to divide one measure by another

0 votes

Sample Dataset:

school  student marks
a       xyz      5
a       xyz      10
a       abc      15
b       cde      20
b       cde      25
a       cde      30

Goal: Find total marks, count of marks and average marks by student and school

Query: How can I create the 4th column when 2nd and 3rd columns are measures. Is it possible to perform a row level calculation?

student sum of marks    count of marks  average marks
xyz      15              2               7.5
abc      15              1               15
cde      75              3               25

school  sum of marks    count of marks  average marks
a       60              4               15
b       55              2               27.5
Apr 10, 2018 in Tableau by ghost
• 1,790 points
1,432 views

1 answer to this question.

0 votes

Yes it is possible,

Option 1:

Create a calculated field as "average marks":

SUM(marks)/COUNT(marks)
 

Option 2:

Right click the measure and select average from the options instead of sum or count.

answered Apr 10, 2018 by ffdfd
• 5,550 points

Related Questions In Tableau

0 votes
1 answer

How to sort by any measure in a Tableau table?

Hi Sindhu, Once you have created a bar ...READ MORE

answered Mar 8, 2019 in Tableau by Cherukuri
• 33,030 points
10,661 views
0 votes
1 answer

How to split or divide the grouped data into multiple graphs?

One of a simple approach is to ...READ MORE

answered Apr 17, 2018 in Tableau by xyz
• 1,560 points
849 views
0 votes
1 answer

How to determine average per event by year?

Hi Roshan, Create a new calculated field (use ...READ MORE

answered Sep 25, 2018 in Tableau by Machdata
• 340 points
863 views
0 votes
1 answer

How to Split a Measure in Tableau?

Have you tried using an IF statement: IF ...READ MORE

answered Aug 14, 2018 in Tableau by AwesomeSauce
• 860 points
2,053 views
0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
9,891 views
0 votes
1 answer

Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
1,594 views
+2 votes
1 answer
0 votes
1 answer

Reset filters in Tableau

I understood your question (I hope so!). ...READ MORE

answered Mar 30, 2018 in Tableau by QueenBee
• 1,820 points
4,033 views
+2 votes
1 answer
0 votes
1 answer

How can I use Tableau to create a heatmap?

Step 1: Create an Excel Spreadsheet with ...READ MORE

answered Apr 2, 2018 in Tableau by ffdfd
• 5,550 points
2,909 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP