I’m just started doing a project and I am stuck at data manipulation section. I have a couple of questions for you and I would be more than happy if I could get some help on these.
question 1)
I want to create a math formula with if function. Basically what I want to do is:
Add rows Servicemonth+1 if servicemonth<=Age*12
Name Surname Age ServiceMonth
A B 60 715
C D 60 718
Name Surname Age ServiceMonth
A B 60 715
A B 60 716
A B 60 717
A B 60 718
A B 60 719
A B 60 720
C D 60 718
C D 60 719
C D 60 720
question 2)
I have a variable that calculates number of months of the year that I worked on the project. I want to see when I started the project by adding a new column that reduces the number of months from the date I have. There are also finished projects so not all data is current date. For example: How can I reduce 35 months from 01.05.2020 and get a date?
Thank you for the reply. I did. My problem is a little more complicated than what I mentioned above. What I am trying to do is duplication of a workflow from Altryx to KNIME. However, the iif function I have on alteryx is a little more complicated than what I can replicate on KNIME, I think. So I have 3 variables that I am using for the iif function in Alteryx. What I am basically trying to do is: Generate Rows if desired variable is between two numbers. The variable names are different from what I mentioned above but I will try to explain the best I can.
So what I have is:
iif([Age_at_Val]>=[Retirement Age]*12,Age_at_BOM<=[Age_at_Val]+1,Age_at_BOM <= [Retirement Age]*12)
which means if the value Age_at_BOM satisifies this condition stop generating rows. If not add +1 to Age_at_BOM and keep generating rows until the function is satisified. I’ve been trying to duplicate this function to KNIME but having a hard time doing so. I would really appreciate the help.
I tried implementing the code to my problem. However, the function just stops by adding +1. It doesn’t generate any further rows until the condition is satisified.
O my fault … I did not understand very well your problem … I think, to add rows to the table you will have to use one of the loops (maybe Interval loop start) …
Thank you for the help. I tried implementing that to my workflow but couldn’t make it work. My problem is a little more complex than this. I wrote about it 3-4 comments above. I was trying to get a basic grasp of things but seems like it is more complicated than I thought it would be. I really appreciate all the help I can get.
So in the alteryx formula it says Age_at_BOM has to start from Age_at_val+1 to RetirementAge*12. I am posting a screenshot of the output data I have in Alteryx. I want to replicate this at KNIME. Sorry if the problem got confusing the language of two programs are not super similar.
The final result for the first person is as following:
When formula reaches retirement*12 it should stop generating rows and go to the next person(identifier) and start doing the same formula for that person.
Thanks Ivan,
also coming originally from Alteryx. But this forum and it’s contributors are amazing when it comes to help each other out.
Highly appreciate that you share your solutions here!
best regards