Forum Discussion
Create a column with fixed values based on current month
- 5 years ago
You can use the the below function. Replace Date with DateTime or DateTimeZone depending on the column type.
Date.ToText([DateColumn], "01/MM/yyyy") - 5 years ago
Hi Anonymous
For the first colum:
= Date.StartOfYear(Date.From(DateTime.LocalNow()))For the second:
Date.AddYears([Column1], -1)Note it references Column1, the first column we've created
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Anonymous
1st column: reads the current Date and time, converts it to date and extracts the first day of the year the date is in
2nd column simply takes the date from the previous column and subtracts one year
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Got it, thank you !