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
jnrezk
Helper III
Helper III

Calendar table - can't change month to date type

Hi there! I have a calendar table that I created by the month & month name show up as text and not a date 

I would like to ideally show the month in mm/yyyy format but when I try to change it I can't there's an error saying it needs to be in text. I linked my file below - can you help me figure out how to change it or add it in date format? Otherwise, when I pull into visuals it doesn't sort it on date order.

https://drive.google.com/file/d/1SFnhsbm1luBqPGgjKZl3Ewf88hA5GZy-/view?usp=sharing


thanks!

2 ACCEPTED SOLUTIONS
Icey
Community Support
Community Support

Hi @jnrezk ,

 

This won't work in the graph, unless you change the X-axis type from "Continuous" to "Categorical".

 

But this will show duplicated date. It is because its essence is still "Date" by day, not by month.

Icey_0-1642755933408.png

 

In addition, why doesn't the text format meet your needs?

 

 

Best Regards,

Icey

 

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

Icey
Community Support
Community Support

Hi @jnrezk ,

 

I think this can also work, please check:

Month_Text = FORMAT([Date],"mm/yyyy")
YearMonth = FORMAT([Date],"yyyymm")

Icey_1-1642757223959.png

 

Icey_2-1642757277729.png

 

 

Best Regards,

Icey

 

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

9 REPLIES 9
Icey
Community Support
Community Support

Hi @jnrezk ,

 

Try this:

mmyyyy.gif

Icey_0-1642668599945.png

 

 

Best Regards,

Icey

 

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

Hi @Icey this works but when I go to make the graph it doesn't work correctly. January 2022 is at the beginning and the format isn't right?

jnrezk_0-1642672959615.png

 

I tried switching between date & date heirarchy too

Icey
Community Support
Community Support

Hi @jnrezk ,

 

This won't work in the graph, unless you change the X-axis type from "Continuous" to "Categorical".

 

But this will show duplicated date. It is because its essence is still "Date" by day, not by month.

Icey_0-1642755933408.png

 

In addition, why doesn't the text format meet your needs?

 

 

Best Regards,

Icey

 

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

Hi thanks, because I need the graphs to work and the slicers to show rolled up months. Do you have a solution for that?

Icey
Community Support
Community Support

Hi @jnrezk ,

 

I think this can also work, please check:

Month_Text = FORMAT([Date],"mm/yyyy")
YearMonth = FORMAT([Date],"yyyymm")

Icey_1-1642757223959.png

 

Icey_2-1642757277729.png

 

 

Best Regards,

Icey

 

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

Wonderful. This worked. Many thanks 🙂

jnrezk
Helper III
Helper III

This error comes about when i do that 

jnrezk_0-1642418943291.png

 

amitchandak
Super User
Super User

@jnrezk , create a column

 

Month year = format([Date], "mm/yyyy")

and

Month year Sort = format([Date], "yyyymm")

 

Select the first column and from column tool , mark the second column as sort column

 

Sort Month Year.png

 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

Hi @amitchandak  I don't think I tagged you in my response above but one of the formulas didn't work - could you advise? Thanks!

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.