Forum Discussion
Fab117
Helper IV
3 years agoIn 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. ...
- 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
BA_Pete
Super User
3 years agoHi 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
Fab117
Helper IV
3 years agoHi Pete,
Thank you for taking time looking at my question and also for the very clear detailled formaulae which will help me also with future challenges.
Have a nice end of the day
Fab