Juan Vaca Posted January 29, 2019 Share Posted January 29, 2019 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 More sharing options...
Gaia Paolini Posted January 29, 2019 Share Posted January 29, 2019 Hi 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. Thanks Gaia Link to comment Share on other sites More sharing options...
Juan Vaca Posted January 29, 2019 Author Share Posted January 29, 2019 I hope this is enough information i am display it in a crosstable Link to comment Share on other sites More sharing options...
Gaia Paolini Posted January 30, 2019 Share Posted January 30, 2019 Hi 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. Gaia Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now