Stacking all rows from two column into one column RRS feed

  • Question

  • I've got 4 date columns(Majors Due, Majors Actual, Minors Due, and Minors Actual). I would like to create a new table that combines the due columns together and the actual columns together. I would just like them to stack on top of each other so if minors due has 30 entries and majors due and 45 entries, the new column will have 75 rows. Also, not all values in these rows are unique if that factors into it.

    Then if possible I would like a third column in the new table that says whether It was a major or minor date.

    • Edited by jshinnenkamp Wednesday, December 13, 2017 6:08 PM
    Wednesday, December 13, 2017 3:44 PM

All replies

  • Hi jshinnenkamp,

    Do you want to create these columns in SQL Server database or analysis services? your request is in the Analysis services forum.

    Can you provide some samples and the expected results?

    Please mark as answered, If you feel happy with this answer.

    Wednesday, December 13, 2017 7:37 PM
  • Hi Jshinnenkamp

    Thanks for your question.

    To solve your question more efficiently, would you mind typing out 5-10 rows of example data for these table, then showing what result you are expecting based on those sample data?Do mask sensitive data before uploading. 

    Best Regards
    Willson Yuan
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, December 14, 2017 2:13 AM