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
M_SBS_6
Helper V
Helper V

Flag to show current and previous FY

Hi, 

I have a financial year column which outputs the financial year of the record we store (e.g FY21/22)

 

The financial year runs from 1st September to 31st August.

 

What I'd like, if possible, is to have a flag that outputs "current fy" and "previous fy" based on the date range above.

 

So, as of today, FY20/21 will show "previous fy" and FY21/22 will show "current fy".

 

And when we move to 1st September 2022, that will show as "current fy" and FY21/22 will change to show "previous fy" and FY20/21 will then show as "blank".

1 ACCEPTED SOLUTION
Hoangechip910
Frequent Visitor

We need 2 date marks: start_of_currentFY and start_of_previousFY to define flag

 

measure start_of_currentFY = 

if (MONTH(TODAY()) in {9,10,11,12}, DATE(YEAR(TODAY()),9,1),DATE(YEAR(TODAY())-1,9,1))
measure start_of_previousFY
if (MONTH(TODAY()) in {9,10,11,12}, DATE(YEAR(TODAY()-1),9,1),DATE(YEAR(TODAY())-2,9,1))
 
then we make comparasion to define flag in data table:
 
column Flag = if ( Date >= start_of_currentFY, "CurrentFY",if ( Date >= start_of_previousFY,"Previous FY", blank()))

View solution in original post

2 REPLIES 2
Hoangechip910
Frequent Visitor

We need 2 date marks: start_of_currentFY and start_of_previousFY to define flag

 

measure start_of_currentFY = 

if (MONTH(TODAY()) in {9,10,11,12}, DATE(YEAR(TODAY()),9,1),DATE(YEAR(TODAY())-1,9,1))
measure start_of_previousFY
if (MONTH(TODAY()) in {9,10,11,12}, DATE(YEAR(TODAY()-1),9,1),DATE(YEAR(TODAY())-2,9,1))
 
then we make comparasion to define flag in data table:
 
column Flag = if ( Date >= start_of_currentFY, "CurrentFY",if ( Date >= start_of_previousFY,"Previous FY", blank()))

Thank you so much for your help, I really do appreciate it. 

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.

Top Solution Authors