Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 45 | |
| 35 | |
| 30 | |
| 15 | |
| 15 |
| User | Count |
|---|---|
| 58 | |
| 56 | |
| 38 | |
| 21 | |
| 21 |