Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to add to another row the additional amount and keep the same lines as in the original

Nazik_Ghukasyan
7 - Meteor

Hello community

 

I am difficulties to apply following logic(see sheet input).

  • if total hour/name/day is less than 7.5 then keep the original hours
  • if total hour/name/day is between 7.5 and 10 then for the day apply 7.5
  • if total hour/name/day is more than 10 then put the difference to another row for another day for the same person

do you think this is possible? I put output sheet as a result I'd like to see

thank you

4 REPLIES 4
ArtApa
Alteryx
Alteryx

Hi @Nazik_Ghukasyan  - Yes, this is possible. Just need to better understand your requirements.

 

1) You have the following in the attached file:

ArtApa_0-1622890840300.png


 a) You did not specify what needs to be done with the current line if time > 10. In the example above you out 7.5. Please confirm this is a rule.
 b) You wrote that "if total day hour is >10 then apply time - 10 to another line". In the example above 12-10=2 and we can expect 1+2=3 in the second line. However, you put 1+5.5=6.5. Please explain.

 

2) Now what needs to happen if you transfer time-10 to a new line, but then you get a time >10?

 

3) What needs to happen if you have a time >10, but no lines below. Do you need to create a new record, i.e. 0+(time-10)?

DawnDuong
13 - Pulsar
13 - Pulsar

Hi @Nazik_Ghukasyan 

What you asked for is possible. To get the desired output format, you need 1 transformation step. Hope this helps.

Dawn.

Nazik_Ghukasyan
7 - Meteor

hi @ArtApa thanks for your email and sorry I was OOO

please see my responses below:

1. if the total hours spent by a person for a day is less than 7.5 then there is no change

2. if the total hours spent by a person is between 7.5-10 then we apply for total hours 7.5 (the difficultly is when there are several lines for the same day let's say 3H for X + 2 for Y + 4.5 for Z)

3 if the total hours spent by person is more than 10 for example is 12, than we should apply for that day 7.5 (as point 2) but the difference (12-7.5=4.5) to the next day for the same person.

 

Sorry I attach the new file as there was a small mistake.

Nazik_Ghukasyan
7 - Meteor

hi @DawnDuong thanks for your try, I am not sure it is giving the right result. can you please see my response with the conditions as well as updated file for your reference

 

thank you much for your help

Nazik

Labels