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

How to get the “Month Name” for the Year-Month combination column.

Hi All,

 

I have a dataset which is in "Year Month" column combination such as “2017-07”.

I have created 2 calculated columns and used Year and Month DAX functions. It works fine.

But when I use Month Name and use Format function the date I get same information ("2017-07") for that new column as shown.

Date Format Issue.png

 

How could I get a Month Name using DAX?
Any help would be highly appreciated. 

 

 

 


1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks @thiagopinho for your reply ...

 

My issue was this actually 

 

Dataset has string value “Year-Month”

01 String Year Month.jpg

So I used CONCATENATE, YEAR, MONTH and  DATEVALUE DAX functions to achieve  this

02 Construct Date.jpg03 Date.jpg04 YEar.jpg05 Month No.jpg06 Month Name.jpg

 

 

Thanks!

View solution in original post

4 REPLIES 4
thiagopinho
Frequent Visitor

Hey Sandy, 🙂

What did you use to create that "Month Name" column??
to get the month names you may do something like this,

 

Transform that "Month Name" column to Date type,

To transform to Date typeTo transform to Date type

 

 

 

 

 

 

 

and then extract the month name of it.

Ajuda2.PNG

Date>Month>Name of Month

Anonymous
Not applicable

Thanks @thiagopinho for your reply ...

 

My issue was this actually 

 

Dataset has string value “Year-Month”

01 String Year Month.jpg

So I used CONCATENATE, YEAR, MONTH and  DATEVALUE DAX functions to achieve  this

02 Construct Date.jpg03 Date.jpg04 YEar.jpg05 Month No.jpg06 Month Name.jpg

 

 

Thanks!

@Anonymous,

You have solved this issue, right? If so, you can accept your reply as answer to close this thread. You can also create Month Name column using DAX below.

MonthName = SWITCH(Table[Month],
1,"Jan",
2,"Feb",
3,"Mar",
4,"Apr",
5,"May",
6,"Jun",
7,"Jul",
8,"Aug",
9,"Sep",
10,"Oct",
11,"Nov",
12,"Dec"
)




Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-yuezhe-msft Thanks for suggestion. 

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.