Forum Discussion

cassidy's avatar
cassidy
Icon for Power Participant rankPower Participant
6 years ago
Solved

Extract Dates from Date Range & Unpivot

I couldn't find this exactly example, sorry if it's repeat.

 

I want to allow users to type in 4 columns....Product, Promotion, Start Date, & End Date.  This happens in an Excel file on OneDrive.

 

My not ideal solution is to make the user type in all the dates needed, separated with commas.  Then I Split Column & Unpivot, this gets me to where I want to be.

 

 


 

 

 

Any ideas how to take a Start Date column & a End Date column, find the dates inbetween, split them out into columns and unpivot?

  • Hi cassidy 

     

    look at this.

     

    List.Dates([Start Date], Duration.Days([End Date] - [Start Date]), #duration(1, 0, 0, 0))

     

    If I answered your question, please mark my post as solution, this will also help others.

    Please give Kudos for support.

2 Replies

  • mwegener's avatar
    mwegener
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hi cassidy 

     

    look at this.

     

    List.Dates([Start Date], Duration.Days([End Date] - [Start Date]), #duration(1, 0, 0, 0))

     

    If I answered your question, please mark my post as solution, this will also help others.

    Please give Kudos for support.