Forum Discussion
bstark1287
Helper II
4 years agoReturn Current Year Only
I need this to return Current year only. Also if I could get a separate means to return previous year only in a different measure. I am stuck and have searched all over for a solution. OB YTD S...
- 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.
parry2k
Super User
4 years agobstark1287 Are you getting blank values? Do your Calendar dimension have dates in the future?
✨ 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.