Jump to content

need help with this script

Juan Vaca

Recommended Posts

I have been banging my head up against the wall on this

I a creating a column with this equation but Spotfire refuses to accept it.

the basic pseudocode is this:

column3 = Sum[column1]/Count[column2]

I've done

Sum([column1]) over Count([column2])

and others (not to take up space) but it keeps rejecting it :(

Link to comment
Share on other sites


the first formula looks correct, it calculates the sum of non-null values of the first column and divides it by the count of non-null values of the second column. It would be the same result for each row.

The second formula would not work.

It is probably something to do with the data. Can you upload a sample dataset or dxp.



Link to comment
Share on other sites


the formula to reproduce your desired result in a table is

[column1] / ([column1] + [column2])

apart from the first row, in which you have divided column1 by column2 alone.

I don't know what axes you want to display in a cross table, if you upload a dxp I might be able to help.This does not look like the original formula you wanted to apply, which was summing/counting across rows as well as columns. The file you uploaded looks like a simple ratio of columns row by row.


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...