Jump to content

Calculated Column Using IF statement and referencing a parameter/property control


Delane Z

Recommended Posts

Hi All,

I am hoping to create a calculated column that references a parameter that can be set by end users. My current calculation is written below; however, there is an error here and I'm not sure how to fix it. Please help - thank you.Note: The two dimensions and the parameter are all date fields. I'm not sure if this impacts the error.

Have tried both with no luck:

 

If(([Date Field]=${CurrentMonth}),[Next Phase Date],"Null")

Case when [Date Field] = ${CurrentMonth} then "true" else "false" end

 

ERROR: Invalid type for function call '=' on line 1, character 18

 

I have tried changing the third value to a date type field. However, the same error returns. I believe there may be an issue with the first condition in the statement.

Link to comment
Share on other sites

Please check the data types of [Date Field] and ${CurrentMonth}. string, date or integer Convert the input when needed. Check the date time conversion functions and what data type they deliver.

 

Maybe you run also into this issue...:

 

https://community.spotfire.com/questions/create-calculated-column-custom-expression-based-user-defined-document-property-selection

 

Please let me know if this solved your issue

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