Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Generate new rows with new tasks by name data set

AntlRo
8 - Asteroid

Hello 

 

Is there a tool or a way for the below :

 

I have a data set as such below currently for a hr company payroll :

 

Name |   Task Name |  hours|

John |   run | 2 |

John | walk |3 |

Susie | run | 4 |

Susie | walk | 3 |

Susie | Climb |1 |

Susie| Crawl | 1 |

Barry | Run | 5 |

 

I want the output to create new rows for each name and task and show zero since they had that option but didnt select it in the form ( they truly did 0 hours)

 

Name |   Task Name |  hours|

John |   run | 2 |

John | walk | 3 |

Jonh | Climb | 0 | -- new row

John | Crawl | 0 | -- new row

Susie | run | 4 |

Susie | walk | 3 |

Susie | Climb |1 |

Susie| Crawl | 1 |

Barry | Run | 5 |

Barry | walk | 0 | -- new row

Barry | Climb | 0 |-- new row

Barry| Crawl | 0 | -- new row

4 REPLIES 4
gautiergodard
13 - Pulsar

Hey @AntlRo 

Attaching one way you could do this!

gautiergodard_0-1667486039538.png

 

Hope this helps!

DataNath
17 - Castor
17 - Castor

@AntlRo this is what I came up with. Wasn't going to post it as it's just about identical to @gautiergodard's perfectly viable solution. However, I figured that the lookup table I use is a different approach as this creates a hard list of activities to check against. Whereas, the summarize approach may fall down if you're wanting to check for hours of activities that nobody has logged at all:

 

DataNath_0-1667486549880.png

 

This would just rely on you keeping the lookup up to date:

 

DataNath_1-1667486572295.png

binuacs
21 - Polaris

@AntlRo One way of doing this with the batch macro

 

binuacs_0-1667495009954.png

binuacs_1-1667495129189.png

 

AntlRo
8 - Asteroid

This is awesome as well thanks! 

Labels