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
siddrow
Helper III
Helper III

Only show data in visualisation if financial year is within the next 25 years

Hi

 

I've got a financial year column in my dataset which I'm using in the Timeline Storyteller visualisation. I need to only filter on years within the next 25 years only (my dataset goes up to 2070). The format of the financial year is "2022" so i'm struggling to work out how to do this. It will need to be a rolling automatic calculation, so for FY 2023, it will show data for 2023-2048, then next financial year it will show data for 2024-2049. I don't want to have to add in a new custom column or filter every new FY.

 

thanks in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@siddrow . If you year start on 4 month then you need measure like

 

Measure =

Var _min = if(month(today()) <4, year(toady()) , year(toady()) +1 )

var _max = _min +25 

var _min1 = date(_min, 4,1)

var _max1 = date(_max,3,31)

return

calculate(sum(Table[Value]), filter(Table , Table[Date] >=_min1 && (Table[Date]) <=_max1))

 

Starting from next FY

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@siddrow . If you year start on 4 month then you need measure like

 

Measure =

Var _min = if(month(today()) <4, year(toady()) , year(toady()) +1 )

var _max = _min +25 

var _min1 = date(_min, 4,1)

var _max1 = date(_max,3,31)

return

calculate(sum(Table[Value]), filter(Table , Table[Date] >=_min1 && (Table[Date]) <=_max1))

 

Starting from next FY

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.