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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dmoney7612
Helper II
Helper II

Creating date index

I have the below data showing company fiscal year and month number. My intention is to convert this data into a "month year" format. For instance, I need the 202006 to read as September 2020, 202007 as October 2020, and so on. I was told I needed to create an index, but wasn't sure the best way to go about it. I appreciate any insight, thanks!

 

dmoney7612_0-1613249828413.png

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @dmoney7612 ,

 

Based on your description, you can do some steps as follows.

1. Create a date column to record the real date from the "Fisal year month number".

_DATE = DATE(LEFT([Fisal Year Month Number],4),RIGHT([Fisal Year Month Number],2),1)

2. create a calculated column.

Test_for_date = 

var x1=DATEADD('Calendar'[_DATE],3,MONTH)

return

FORMAT(x1,"MMMM"&" "&"YYYY")
Result:

v-yuaj-msft_0-1614932582749.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @dmoney7612 ,

 

Based on your description, you can do some steps as follows.

1. Create a date column to record the real date from the "Fisal year month number".

_DATE = DATE(LEFT([Fisal Year Month Number],4),RIGHT([Fisal Year Month Number],2),1)

2. create a calculated column.

Test_for_date = 

var x1=DATEADD('Calendar'[_DATE],3,MONTH)

return

FORMAT(x1,"MMMM"&" "&"YYYY")
Result:

v-yuaj-msft_0-1614932582749.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Shishir22
Solution Sage
Solution Sage

Hello @dmoney7612 ,

 

You can crete calculated column as

 

 

Column 2 = DATE(LEFT('Table'[Column],4),RIGHT('Table'[Column],2),01)

 

 

And change the format to mmmm yyyy from format option.

 

Shishir22_0-1613253259575.png

 

If this fulfilled your requirement please mark this post as a solution.

 

Thanks!

 

Cheers,
Shishir

I tried this but it doesn't give me the correct order for my fiscal months. For example I need 202006 to be September 2020, but when I use this formula it shows 202006 as June 2020. Are there previous steps I need to complete first? 

Hello @dmoney7612 ,

 

Try this-

Column 2 = DATEADD(DATE(LEFT('Table'[Column],4),RIGHT('Table'[Column],2),01),3,MONTH)

 

Please check for 202012 and 202101 if its giving expected result.

 

If this fulfilled your requirement please mark this post as a solution.

 

Thanks!

Cheers,
Shishir

I am receieving an error right after the ",01),"   

Use your original column 202006 as the Sort By column for the new column.  If that gives a circular dependency error, you will need to make the MMMM yyyy column in the query editor first.

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


mahoneypat
Microsoft Employee
Microsoft Employee

Please try this column expression

 

YM Name = FORMAT(DATE(left(YM[YearMonthIndex],4), RIGHT(YM[YearMonthIndex],2),1), "MMMM YYYY")
 
Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


I'm confused as to what the "YM' in the forumla is referencing 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.