0 votes
1 view
in BI by (17.6k points)

I would like to average N by Type for values of Inst

My data is set up as:

Type, Inst, N

A, A1, 4

A, A1, 13

A, A1, 13

A, A2, 4

A, A3, 5

B, B1, 4

B, b2, 10

So I would like to see a table (or bar chart) with A: 13, B:7. Any suggestions? If I put AVG(N) in rows and Type in columns I get A: 7.8, B:7

The problem is that Tableau is averaging all N per Type, but I want the numerator to be the total Nfor the Type while the denominator is the number of unique Inst within that Type

closed

1 Answer

0 votes
by (47.2k points)
selected by
 
Best answer
  • You can create a calculated field desired_avg as

{FIXED [Inst] : SUM([N])}

  • Now, put it in the sheet.

  • Select aggregation as AVG and not SUM

If you want to learn more about tableau analytics then you can check our Tableau Training online. 

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...