Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hi Experts
need a custom column to do the following if the date is current month -1 then "Actual" ie. Feb 21 and all historical months in year and any future period then return "4YOP".
Solved! Go to Solution.
@Anonymous , you have shared your formula. I copy passed same in my file and changed the date and it worked , only in bold need to be changed
if [Sales Date] >= Date.StartOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()),-1)) and [Date] <= Date.EndOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()),-1))
then "Actual" else "4YOP"
@Anonymous , Try a new column like
if [Date] >= Date.StartOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()),-1)) and [Date] <= Date.EndOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()),-1))
then "Actual" else "4YOP"
Getting an error here "Actual" - message Token Eof expected? - or alternatively on then
@Anonymous , you have shared your formula. I copy passed same in my file and changed the date and it worked , only in bold need to be changed
if [Sales Date] >= Date.StartOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()),-1)) and [Date] <= Date.EndOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()),-1))
then "Actual" else "4YOP"
Apologies my fault... i had IF as opposed to if.... thanks Amit
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 63 | |
| 49 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 122 | |
| 118 | |
| 38 | |
| 36 | |
| 29 |