Kom Son Posted July 1, 2021 Share Posted July 1, 2021 The formula basically says that if a cell (count) in excel is = 0 then the new column should populate "no value". However, if the cell is not equal to 0, then the avg of a specified column should be calculated for all rows in the new column. Spotfire custom expression I currently have is: case when [column_that_calculates_count] = 0 then "no value" else avg([specified column]) end What am I doing wrong Link to comment Share on other sites More sharing options...
Shrutika Aggarwal Posted July 6, 2021 Share Posted July 6, 2021 Could you please tell me if there is any error message Link to comment Share on other sites More sharing options...
Fabian Duerr Posted July 6, 2021 Share Posted July 6, 2021 I expect you get different output types. And a column can only hold one data type. "no value" is a STRING,avg([whatever_numeric_column]) is a REAL So, either replace "no value" with NULL. Or wrap STRING() around your average expression. 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