Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
Couple of things I want to ask relating to SAMEPERIODLASTYEAR
My measure...
Solved! Go to Solution.
Its showing months in the future because, although you don't have any sales yet this year, you did have sales for those dates last year. Easiest way to fix that is to add a column to your date table, something like
Today or before = 'Date'[Date] <= TODAY()
and then filter your visual to show only when that is true.
The problem with your table visual showing the values for the full year is happening because there is no filter on the date table - it will take the last date in your date table to work from, which is presumably 31st December 2022. You can either use the column generated above as a filter, again set to true, or use a relative date filter to show values in the last 0 or 1 calendar days, including today. That will give the values from Jan 1 to today last year. I think this will show what you are after for your second questions as well.
@johnt75- thank you for this, worked perfectly on both fronts. You've helped me a few times now so thank you again!
Its showing months in the future because, although you don't have any sales yet this year, you did have sales for those dates last year. Easiest way to fix that is to add a column to your date table, something like
Today or before = 'Date'[Date] <= TODAY()
and then filter your visual to show only when that is true.
The problem with your table visual showing the values for the full year is happening because there is no filter on the date table - it will take the last date in your date table to work from, which is presumably 31st December 2022. You can either use the column generated above as a filter, again set to true, or use a relative date filter to show values in the last 0 or 1 calendar days, including today. That will give the values from Jan 1 to today last year. I think this will show what you are after for your second questions as well.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |