Columns with 2 Unique Values (1,0), into one Column

Hoping someone can help me solve this.

 

I have a dataset that has multiple columns with a 0 or 1 value. I'm trying to combine these multiple columns into one using a beastmode, naming those values with their respective headers -

 

So:

 

(CASE
when `Business Change` = 1 then 'Business Change'
when `Division Change` = 1 then 'Division Change'
when `GL Department Change` = 1 then 'GL Department Change'
when `GL Business Unit Change` = 1 then 'GL Business Unit Code Change'
when `GL Operating Unit Change` = 1 then 'GL Operating Unit Change'
when `Job Code Change` = 1 then 'Job Code Change'
else 'Other' End)

 

-- The problem I am running into is that this beastmode is used for a year's worth of data. At the beginning of the year, you could have a division change, and at the end of the year, a job code change. This beastmode doesn't pull the last most current change - so instead of the job code change, it would pull the division change instead. 

 

Is there a way to solve this problem? Or would it be better to fix the issue in another way? Thank you! 

Comments

  • I'm assuming that your data set has a date field in it.  

     

    You could add some transforms in your dataflow that would call out the most recent change per employee.  Then you could add that field to your beastmode.


    “There is a superhero in all of us, we just need the courage to put on the cape.” -Superman