cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

How to Create a Month Year Column in Calendar

Hello all, 

 

I am trying to find a formular to create a mont year column (eg: November 2019, December 2019) that can also be sorted chronoically (eg: November 2019, December 2019, Janauary 2020, February 2020) from my data calendar. 

 

I have checked out some suggestions here such as 1, 2, 3, 4 but none of them is working for me. I have also tried to find a DAX functions but it only has a month or a year function seperately. 

 

Thank you! 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: How to Create a Month Year Column in Calendar

@ale3 ,

Why are giving column = Month Year = format([Date],"mmmm yyyy")

you have to give only

Month Year = format([Date],"mmmm yyyy")

or

Month Year = format([Date];"mmmm yyyy")

Create a month year sort column

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

9 REPLIES 9
Highlighted
Frequent Visitor

Re: How to Create a Month Year Column in Calendar

Hi send you one example new column en Calendar Table: I don't know if that it's what you need.

 

MONTH L2 = FORMAT('Date'[Date];"mmmm") & " " & 'Date'[Year]

 

Please confirm me.

Highlighted
Super User IV
Super User IV

Re: How to Create a Month Year Column in Calendar

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

But, should be something like:

Column = MonthYear = MONTH([Date]) & YEAR([Date])

or

Column = FORMAT([Date],"MMMM YYYY")
 
There are lots of options.

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Super User IV
Super User IV

Re: How to Create a Month Year Column in Calendar

@ale3 

Create a column month year

Month Year = format([Date],"mmmm yyyy")

Create a month year sort column

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

 

Mark this new sort column as sort column of the month year

Refer:https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Sort_by_column.pngSortnewribbion.png

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
New Member

Re: How to Create a Month Year Column in Calendar

My bad. I will check the link out. 

 

It gives me an error. Any idea why?

 

Capture.JPG

Highlighted
New Member

Re: How to Create a Month Year Column in Calendar

Hi thank you for your help. Unfortunately, it gives me an error message like this. 

Capture1.JPG

Highlighted
Frequent Visitor

Re: How to Create a Month Year Column in Calendar

Change ; by ,

Highlighted
Super User IV
Super User IV

Re: How to Create a Month Year Column in Calendar

Sorry, meant:

MonthYear = MONTH([Date]) & YEAR([Date])

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Super User IV
Super User IV

Re: How to Create a Month Year Column in Calendar

@ale3 ,

Why are giving column = Month Year = format([Date],"mmmm yyyy")

you have to give only

Month Year = format([Date],"mmmm yyyy")

or

Month Year = format([Date];"mmmm yyyy")

Create a month year sort column

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
New Member

Re: How to Create a Month Year Column in Calendar

Thank you very much! It works perfectly! 

Helpful resources

Announcements
Super Users of the Quarter - Q2 2020

Super Users of the Quarter - Q2 2020

Who are our Super User Superstars? Who made it to the top of the leaderboards? Get the answers!

June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Kudoed Authors