Forum Discussion

MigCua's avatar
MigCua
Frequent Visitor
4 years ago
Solved

Split per month recurrent values

Hi! I have a doubt of how to build a report. I have a table where I can find diferent lines related to item which has the following structure: - Item code - Date valid From -Date Valid to - Mon...
  • BA_Pete's avatar
    4 years ago

    Hi MigCua ,

     

    Add a new custom column in Power Query like this:

    List.Distinct(
        List.Transform(
            {Number.From([Date valid from])..Number.From([Date valid to])},
            each Date.StartOfMonth(Date.From(_))
        )
    )

     

    This should give you a nested list of the first of each month on each row.

    Expand this list to new rows and you'll have everything you nee to report as required.

     

    Pete