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
Anonymous
Not applicable

Financial Period to calender year month

Hi all,

 

I need to convert the financial period into calender date. Example : 2020101  to  202007

 

That would be great if any of you could help me with the DAX formula that I can use....

 

 

Thanks,
Melissa

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Try a new column like

Calendar period =
var _year =left([FY Period],4)
var _pp =right([FY Period],2)
return
if(_pp<=6 , (_year -1) & (_pp+6) , _year & (_pp-6))

Anonymous
Not applicable

I am getting this error:

 

DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.

Anonymous
Not applicable

Thanks for your reply, I have the FY period and I want to creat calender period.

 

Raha_228_0-1605589971788.png

 

amitchandak
Super User
Super User

@Anonymous , not very clear.

You can create date from it

date = date(left([col],4), right([col],2),1)

 

Refer to my blog on how to get FY for each month : Creating Financial Calendar - From Any Month
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441

Video: https://www.youtube.com/watch?v=euIC0dgGTNM

 

Can you share sample data and sample output in table format?

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