Showing results for 
Search instead for 
Did you mean: 
INSPIRE 2018 | Join us in Anaheim June 4-7th! Classes are filling up fast -- Secure Your Product Training Sessions Now!
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.

Challenge #80: Slowly Changing Dimensions


Last week's solution has been posted here


This week's challenge explores the problem of Slowly Changing Dimensions, which some of you may be familiar with as you update existing or historical data with changes to those attributes.  In this challenge, we'll be updating our log of Jedi rankings to reflect changes in Jedi levels, promotions, and retirements (yes, even the Jedi Knighthood has an HR department). 


The challenge's Start file contains an input of the "Current Log", which includes data on an individual's level, when they started at that level, and when they completed that level. Records with an end date indicate either a promotion or a separation for that individual.  The input "Today's Updates" includes the changes that take effect today: Bob has joined the Dark Side, Kaitlin and Richard have been promoted up the Jedi Ranks and Joe has joined the Jedi Knighthood. Your task: create a workflow that produces an updated list of the current Jedi ranks.


Use the!Use the!







My solution! Welcome to the Dark Side, Bob...







Alteryx Certified Partner

Fun Challenge!  Made the assumption that if a record successfully joins on both name and level then it is being included and should be closed.  This is how Bob's record drops out.


I was able to use a couple joins and formula tools along with a union.

It is also good to verify the workflow logically, if Bob had more than one record in the Current Log, would it still work as expected?




 Here are my two routes, one with mostly Multi-Row Formula tools, and another with mostly Joins.

Route 1:
route 1.png
- Union Current Log and Today's Updates
- Sort by Name and Start Date
- Multi-Row Formula updates End Date if Current Flag is "Y"
- Multi-Row Formula updates Current Flag if there is no next record for Name, then Current Flag is "Y" else "N"
- Filter to find "Y" Current Flag Records with an End Date
- Join by Name to remove records with those Names

Route 2:
route 2.png
- Join by Name, Level, Start Date. Names that join here can be removed
- Join by Name to remove the newly ended
- Formula on record that came out the Left of the first Join, add Flag Fields
- Join by Name, Current Flag. Records that Join need the Prior record to be updated. Left are record that need no change
- Union records to keep. 1. Existing records with no change needed. 2. New Records. 3. Existing records that needed changes
- Sort by Name and Start Date




"It's not impossible.  I used to bull's-eye womp rats in my T-16 back home. They're not much bigger than two meters."


8.15.16 097.JPG
Alteryx Certified Partner

Fun exercise to sharpen Join+Union combinations


Alteryx Certified Partner
Alteryx Certified Partner



I must have been really slow.  I couldn't understand the issue with Bob.  Finally, I got it.  I looked at how @NicoleJohnson solved hers and took it another direction.  Her solution put light on the Bob issue.  I won't say which runs faster, but since this is a slow exercise I'll say that NJ won that battle.




Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.

Alteryx Certified Partner

Solution attached. Added a 'Joined the Darkside' flag so that we could keep Bob's records but filter the traitor out when we want current Jedi details (this was based on there being an End Date in the update log).


Jedi HR Data Prep WorkflowJedi HR Data Prep Workflow


Alteryx Certified Partner and Jedi HR Manager

This was a fun challenge!

Challenge 80.PNG