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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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