Forum Discussion

Fab117's avatar
Fab117
Icon for Helper IV rankHelper IV
3 years ago
Solved

In a new column. calculate corresponding Quarter from a date

Hello, I've a column with dates. NB: Date in Eu format (dd.mm.yyyy) I would like to create a new column where Power Query would calculate corresponding Quarter/year for the date on the same line. ...
  • BA_Pete's avatar
    3 years ago

    Hi Fab117 ,

     

    Ok, so the basic functions you need are: Date.Year and Date.QuarterOfYear. All we need to do is apply a bit of text gymnastics to get the exact output you need:

    Text.Combine(
        {
            "Q",
            Text.From(Date.QuarterOfYear([TaskFinishDate])),
            " ",
            Text.End(Text.From(Date.Year([TaskFinishDate])), 2)
        }
    )

     

    Pete