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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

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

Thank you Rita.

Awesome.stuff.

Glad to help 🙂

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.