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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.