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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Daretoexplore
Frequent Visitor

Event happening in time period in DAX

Hi all

 

Came across a random query from a colleague today.

 

We have a table with a sale date in, just a date column with the date the sale took place.

 

He has asked if I could build a column using DAX that says if that date is in the current financial year (Just a simple Y or N, and financial year 1st April - 31st March)

 

Is that possible in DAX?

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Daretoexplore 
Yep :

The Dax code for the calculated column is :

current financial year test =
if([date].[Date]>=date(year(today()),04,01) && [date].[Date]<=date(year(today())+1,03,31),TRUE(),FALSE())
Link to PBIX with example: Here 
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @Daretoexplore 
Yep :

The Dax code for the calculated column is :

current financial year test =
if([date].[Date]>=date(year(today()),04,01) && [date].[Date]<=date(year(today())+1,03,31),TRUE(),FALSE())
Link to PBIX with example: Here 
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you Rita.

Awesome.stuff.

Glad to help 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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