Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am trying to filter my data for my reports. I need the last full 3 years plus this YTD. Today is May 4, 2018. So I would want to see 1/1/2014 - 5/4/2018.
Solved! Go to Solution.
I know this is an old thread but putting this on anyways.
This 'Should' be something relative date could do but sadly doesn't. I created a calculated field on my date table called YearIndex
So the current year is 0 and the prior year is -1. Now you can just use the basic filter to get Current Year and Last year or however many years you want.
I know this has been marked as solved but for other people searching for answers, the way I solved this was by using the filter type of Top N values against my Year column (I created a year column based off my date column). I needed last year and YTD values, so I used the Top 2 values by my year column. This gave me all data for last year and this year to date. I hope this helps someone in the future
Perhaps something along the lines of:
Measure = CALCULATE(<something>,FILTER(ALL('Calendar'),[Date]>=DATE(YEAR(TODAY())-4,1,1)))
That is a measure, I can't use that in a relative filter for the page or the report. Thanks for trying!
@bryanshaw46- This is why you need to better explain your data and what exactly you are trying to accomplish. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
@bryanshaw46- The relative date slicer doesn't work that way. You can do Last x Years (current date to current date) or Last x Years (Calendar) but not what you are asking. Therefore, you are going to have to change the filter context of your visual(s). Easiest thing to do would be to use Year (Calendar) mode and then just wipe out anything that is greater than TODAY().
I know this is an old thread but putting this on anyways.
This 'Should' be something relative date could do but sadly doesn't. I created a calculated field on my date table called YearIndex
So the current year is 0 and the prior year is -1. Now you can just use the basic filter to get Current Year and Last year or however many years you want.
Amazing Solution! Thank you!
I logged in, just to be able to give you a thumbs up! Your solution is perfect for me.
Thank you! Solved my issue, exactly what I was looking for. Should be chosen as solution.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |