I am facing issues to return calculated value using if statement.
Can someone suggest the possible nodes to solve this?
Col1: Location Currency
Col2: Invoice Currency
IF (Location Currency = Invoice Currency)
If (Location Currency = “EUR”)
Return Invoice Currency / Location Currency
Return Location Currency / Invoice Currency
I assume you have actual int or floats somewhere in the table to the mathematical operation. Or are you in fact dividing strings? If you provided some sample data structured like your table I could probably solve this for you!
The data set also contains string as shown in the example.
Your issue is a bit tricky because you want to output a string with the symbol of division, which is not capable with strings. I wrote you a workflow that solves this issue, however, using some if/else logic and string manipulation.
Nested IF with calculated return value.knwf (47.4 KB)
Hope this helps, my friend!
This works perfect!!!
Thanks for the help…
I would go with scripting in this case to have it all in one node. So either Java, Python, Column Expressions…
Here is solution with last option mentioned.
Nested IF with calculated return value_ipazin.knwf (25.4 KB)
Cool! I was unfamiliar with the Column Expressions node. I will play around with this!
This is really cool. Thank you!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.