Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I would like to build a query in which the results is the last day of june every year. Example since we are in march of 24 right now I would like the table to return 6/30/24, however on 7/1/25 I would like it to return 6/30/26.
Solved! Go to Solution.
hi @Greyangel
welcome tot he community.
you could do the follwing to determine it:
let
EndOfJuneDate = (yourEvaluationDate as date) =>
let
currentYear = Date.Year(yourEvaluationDate),
nextYear = currentYear + 1,
lastDayOfJune = #date(currentYear, 6, 30),
nextYearFirstDay = #date(nextYear, 1, 1)
in
if yourEvaluationDate >= lastDayOfJune then
nextYearFirstDay
else
lastDayOfJune
in
EndOfJuneDate
This is what happens
hi @Greyangel
welcome tot he community.
you could do the follwing to determine it:
let
EndOfJuneDate = (yourEvaluationDate as date) =>
let
currentYear = Date.Year(yourEvaluationDate),
nextYear = currentYear + 1,
lastDayOfJune = #date(currentYear, 6, 30),
nextYearFirstDay = #date(nextYear, 1, 1)
in
if yourEvaluationDate >= lastDayOfJune then
nextYearFirstDay
else
lastDayOfJune
in
EndOfJuneDate
This is what happens
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
116 | |
82 | |
47 | |
42 | |
34 |
User | Count |
---|---|
186 | |
80 | |
72 | |
48 | |
45 |