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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ca-traveler
Regular Visitor

Need Help Converting Excel Formula to Power Query Formula

Good day all, 

 

Was wondering if someone could help me convert this formula to a power query formula? I am trying to convert the program need date to the fiscal year in the fiscal year column (please see pic below). Any help or guidance would be appreciated. Thanks in advance! 

Trent 

 

=IF((MONTH(P3)>=10),(YEAR(P3)+1),YEAR(P3))

catraveler_0-1700236139584.png

 

2 ACCEPTED SOLUTIONS
DOLEARY85
Super User
Super User

Hi,

 

try this:  

 

if Date.Month([Date])>=10 then Date.Year([Date])+1 else Date.Year([Date])

 

DOLEARY85_0-1700237377967.png

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

 

View solution in original post

Awesome, that worked! thank you so much! 🙂 

View solution in original post

2 REPLIES 2
DOLEARY85
Super User
Super User

Hi,

 

try this:  

 

if Date.Month([Date])>=10 then Date.Year([Date])+1 else Date.Year([Date])

 

DOLEARY85_0-1700237377967.png

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

 

Awesome, that worked! thank you so much! 🙂 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors