Skip to main content

Hello,

 

What I am trying to do is merge two columns together to show each dimension in its own row (not concatenated)

 

Ex Attached

9 answers
  1. Feb 27, 2023, 6:01 PM

    If you have a Row # or Index # unique to each row, then you could use the following Table Calculation in Desktop:

    IF ISNULL(ATTR([Component No])) THEN LOOKUP(ATTR([Alternate No]),-1) ELSE ATTR([Component No]) END

    Which results in the following and matches your expected output:

    If you have a Row # or Index # unique to each row, then you could use the following Table Calculation in Desktop:IF ISNULL(ATTR([Component No])) THEN LOOKUP(ATTR([Alternate No]),-1) ELSE ATTR([ComponeOr it can be done in Tableau Prep by duplicating the data, creating new calculation on the second (duplicated) flow within the master flow, leveraging the row # with Row # -1 as a calculation, creating an offset row:

    ScreenThen a right-join on Row # from original flow to the duplicated flow using Row # and Row #-1. Lastly a calculation in the last clean step to essentially fill the nulls with the offset row value:

    Screen

     

    Best, Don

    (Please, don't forget to click Select as Best or Upvote !)

0/9000