Forum Discussion
Return Current Year Only
- 4 years ago
Hi, bstark1287
You can try the following methods.
Column:Month = FORMAT([Date],"mmmm")Measure:
Current Year = CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( ALL ( 'Calendar' ), [Month] = SELECTEDVALUE ( 'Calendar'[Month] ) && YEAR ( [Date] ) = YEAR ( TODAY () ) ) )Previous year = CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( ALL ( 'Calendar' ), [Month] = SELECTEDVALUE ( 'Calendar'[Month] ) && YEAR ( [Date] ) = YEAR ( TODAY () ) - 1 ) )Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
bstark1287 check out this video on my YT channel New Year and my MTD and QTD measures stopped working, why? - Power BI - YouTube that talks about when you have dates in the future and how to work with current year only or based on the last transaction date.
✨ Follow us on LinkedIn and to our YouTube channel
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
It is not that my YTD measure isn't working. As you can see from my "current results" example it is working great. I want to limit that result down to current year only, then create a second measure for previous year only. I have to do this in a measure as opposed to a filter because the next requirement is for a dynamic visual to report by order creation date. If you can help me with this I would greatly appreciate it! I have already followed your Linkedin and youtube channel as thanks for your response this far.