Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi,
How I do in power query write out previous year to date?
I have a Year to date flag using date.isinyeartodate(app_date). I just want the same thing but for last year. Any ideas please?
Solved! Go to Solution.
pls try this
Date.IsInCurrentYear(
Date.AddYears( [app_date],1)
) = true and [app_date] <= Date.AddYears(Date.From( DateTime.LocalNow()),-1)
and try this
[
t1 =
Date.AddYears(Date.From( DateTime.LocalNow()),-1),
t2 = Date.StartOfYear(t1),
Result = [app_date]>= t2 and [app_date]<=t1][Result]
pls try this
Date.IsInCurrentYear(
Date.AddYears( [app_date],1)
) = true and [app_date] <= Date.AddYears(Date.From( DateTime.LocalNow()),-1)
pls try this
Thanks. This gives me the whole of last years view but I need last years year to date
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 45 | |
| 38 | |
| 26 | |
| 23 |
| User | Count |
|---|---|
| 135 | |
| 119 | |
| 58 | |
| 37 | |
| 30 |