The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi, I have a var that contains a date. lets say 15.7.2022 for example. How can I get the last day of the year based on that date?
15.7.2022 --> 31.12.2022
3.1.2021 --> 31.12.2021
etc.
Solved! Go to Solution.
Hi @Anonymous ,
How about this one:
DATE ( YEAR ( Table[Date] ), 12, 31 )
This one would give you:
15.7.2022 --> 31.12.2022
3.1.2021 --> 31.12.2021 (instead of 31.12.2022 as you stated in the question above though)
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Hi @Anonymous ,
How about this one:
DATE ( YEAR ( Table[Date] ), 12, 31 )
This one would give you:
15.7.2022 --> 31.12.2022
3.1.2021 --> 31.12.2021 (instead of 31.12.2022 as you stated in the question above though)
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Thanks, works great 🙂
User | Count |
---|---|
69 | |
64 | |
62 | |
55 | |
28 |
User | Count |
---|---|
203 | |
82 | |
65 | |
48 | |
38 |