Hi,
I would appreciate some help on this issue
I have a formula as follows
Event Year (field nam)
IF [EP_Scenario]="2019Actuals" THEN "2019" ELSE IF [EP_Scenario]="2020Actuals" THEN "2020" ELSE "" ENDIF ENDIF
However, when I run the workflow and check the data in the Event year field there are blanks instead of the 2019 and 2020 years that I specified in the formula. Does anybody why this is happenning?
Thank you,
JV
Solved! Go to Solution.
Hi @JonaV
Check the datatype set as the formula output datatype.
"2020" is string
2020 is number
You might have set something numeric
You can use this instead of nested IF
IF [EP_Scenario]="2019Actuals" THEN "2019" ELSEIF [EP_Scenario]="2020Actuals" THEN "2020" ELSE "" ENDIF
Here is a workflow for the task.
Output:
Workflow:
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍
Hi @JonaV,
Could you try
IF [EP_Scenario]="2019Actuals" THEN "2019" ELSEIF [EP_Scenario]="2020Actuals" THEN "2020" ELSE "" ENDIF
You're ELSE IF should be ELSEIF and you only need one ELSEIF on the end of the formula.
If this solves your issue then please mark the answer as correct, if not let me know!
Regards,
Jonathan
Or taking your nested IF function approach you'd need to use
IF [EP_Scenario]="2019Actuals" THEN "2019" ELSE IF [EP_Scenario]="2020Actuals" THEN "2020" ELSE "" ENDIF ELSE "" ENDIF
But i'd still take the first approach as I think it's simpler!
If this solves your issue please mark the answer as correct, if not let me know!
Regards,
Jonathan
The data type is right. Year is a string value not a number. I am not trying to use the Event Year field as a measure.
For some reason it is doing the same in other formulas as well
I am not sure if I should use something other than quotes ("") to specify a string within the EP_Scenario field (which is also a v_string data type)
Here is a snapshot
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |