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

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.

Reply
thne123
Helper I
Helper I

Show values from future years - result is blank

Hi!
 
I'm trying to create a measure that shows me all the values from future years. 
So for this year the example would be that I want all values starting january 1st 2023 and forward. 
 
I have a measure that I've created, but I'm only getting blank values, and I'm not sure why:
 
For testing I have one measure which is based on YEAR(TODAY), and one based on ALLSELECTED where the user selects the year through a slicer instead.
But both gives me blank values:
 

 

 

FY = CALCULATE(SUM(ReportTable[Turnover]), DATESBETWEEN('Date'[Date], YEAR(TODAY()+1), 2100-01-01))

Example two:

FY = CALCULATE(SUM(ReportTable[Turnover]), DATESBETWEEN('Date'[Date], YEAR(ALLSELECTED('Date'[Year])+1), 2100-01-01))

 

 

 

The only measure I've had somewhat success with is when using NEXTYEAR, but that only gives me next year, not all future years.

 

 

FY = CALCULATE(SUM(ReportTable[Turnover]), NEXTYEAR('Date'[Date]))

 

 

 

What am I doing wrong? Thanks!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@thne123 , If there is no filter on the page

 

FY = CALCULATE(SUM(ReportTable[Turnover]), filter('Date' , year('Date'[Date]) > year(today())))

 

if there is filter

FY = CALCULATE(SUM(ReportTable[Turnover]), filter(all('Date' ) , year('Date'[Date]) > year(today())))

 

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@thne123 , If there is no filter on the page

 

FY = CALCULATE(SUM(ReportTable[Turnover]), filter('Date' , year('Date'[Date]) > year(today())))

 

if there is filter

FY = CALCULATE(SUM(ReportTable[Turnover]), filter(all('Date' ) , year('Date'[Date]) > year(today())))

 

 

@amitchandak  Thank you!

This worked

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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