Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Measure Not Returning Prior Year Results

Hello all,

I'm trying to get the count of orders for a previous year. I have the answer via filters, but I'm trying to get it in a measure as part of a larger calculation. However, the below function does not seem to be filtering the data and is instead returning the results of all the years. Anyone know why? 

 

Count of Orders in the Previous Year = CALCULATE([Multi Origin Order Count], Filter(FactTable, YEAR(today())-1))
 
Thanks!
1 ACCEPTED SOLUTION
Anonymous
Not applicable

You can try:

 

 

Count of Orders in the Previous Year = CALCULATE([Multi Origin Order Count], Filter(FactTable, [Datecolumn] = YEAR(today())-1))

 


If its a datatimecolumn use YEAR([datecolumn]) ofcourse.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

You can try:

 

 

Count of Orders in the Previous Year = CALCULATE([Multi Origin Order Count], Filter(FactTable, [Datecolumn] = YEAR(today())-1))

 


If its a datatimecolumn use YEAR([datecolumn]) ofcourse.

Anonymous
Not applicable

I swapped the filtering of the fact table to filter the date dim table and that worked per your solution. 

 

Count of Orders in the Previous Year = CALCULATE([Multi Origin Order Count], 
 FILTER(DimDate, DimDate[Year] = YEAR(TODAY())-1))

 

Thanks!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.