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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
andy808
Helper II
Helper II

Table that filters less than, equal and greater by 1 from another table

I have a Dates Table with FiscalYear column set from 2020 to 2060

The measure CurrentFiscalYear = 

CurrentFiscalYear = IF(MONTH(TODAY()) >= 7, YEAR(TODAY()) + 1, YEAR(TODAY()))
 
I have created a Table below that needs to be dynamic and return Current Fiscal Year (2024), all past years (2020-2023) AND 1 year after Current Fiscal Year (2025).
 
How do I add the 1 year after Current Fiscal Year 2025?

 

andy808_0-1705438714790.png

 

1 ACCEPTED SOLUTION

Thank you for helping....yes we do Fiscal Year

I used: 

FiscalYearTest = FILTER(DISTINCT(Dates[FiscalYear]),Dates[FiscalYear] <= (IF(MONTH(TODAY()) >= 7, YEAR(TODAY()) + 1, YEAR(TODAY()) + 1)))
 
And i got
andy808_0-1705445821795.png

 

View solution in original post

4 REPLIES 4
Daniel29195
Super User
Super User

 

@andy808 

try this : 

FiscalYearTest = 

VAR currentfiscalyear = year(today())

RETURN

Filter ( 
distinct (Dates[FiscalYear] ) , 

Dates[FiscalYear] <  = currentfiscalyear 
)

 

let me know if it works for you 

Thanks, this does not return the Year after the Current Fiscal Year. I am looking for the table to return 2020-2025. Basically Current Fiscal Year +1 year 

@andy808 

try this : 

FiscalYearTest = 

CurrentFiscalYear = IF(MONTH(TODAY()) >= 7YEAR(TODAY()) + 2YEAR(TODAY()) +1 )

RETURN

Filter ( 
distinct (Dates[FiscalYear] ) , 

Dates[FiscalYear] <  = currentfiscalyear 
)

 

so if i understand correctly,

if im in month >=7, then my current fiscalyear should be 2025, and thus i need to get data from 2020 till 2026

 

however,

 

if the month <=7 then my currentfiscal year is 2024 and thus i need to get the data from 2020 till 2025.

 

am i right ? 

Thank you for helping....yes we do Fiscal Year

I used: 

FiscalYearTest = FILTER(DISTINCT(Dates[FiscalYear]),Dates[FiscalYear] <= (IF(MONTH(TODAY()) >= 7, YEAR(TODAY()) + 1, YEAR(TODAY()) + 1)))
 
And i got
andy808_0-1705445821795.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.