Jump to content

Count from another table column


Avinash Made

Recommended Posts

I have two tables in Spotfire. Table A and Table X

 

In Table A, there are various columns --- one columns has the following sample values: Houston, Dallas, Austin, Newark, Dallas, Austin, Newark, Newark ......repeated various times

 

In Table X, there are various columns --- one column has the following sample values: Houston, Dallas, Austin, Newark, Orlando --- but they are unique values

Now in Table X, I want to create a new calculated column that will for for each value tell me how many times it occurs in Table A. For example, the result for Houston will be 1, Newark will be 3, Orlando will be 0

Link to comment
Share on other sites

You don't really need Table X in this case...

You can simply use a cross table with the column [CITY] on the left axis and the aggregation method Count([CITY]) on the buttom axis. The upper axis should be (None).

Or you workwith a calculated column to get the information to your table A:

[CITY COUNT] =Count([CITY]) over [CITY]

If you still want to have this information from table Ain table X you have to insert the column [CITY COUNT] to table X. Your identifier column will be [CITY] and merge method should be "left outer".

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...