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
CloudMonkey
Post Prodigy
Post Prodigy

How to show date hierarchy's month as a number not a name

Hi,

 

Currently my date hierarchy is showing months by their name. e.g. April is showing as "April". Please can you tell me how to make the month show by the month's number? e.g. for April to show as "4"?

 

Thanks for your help,

 

CM

3 REPLIES 3
Anonymous
Not applicable

hi @CloudMonkey ,

 

here, i am sharing my screenshots, plz check it.

 

This is my original DataThis is my original Datathis is how to generated MontName and MonthNumber calculated column by using my Date columnthis is how to generated MontName and MonthNumber calculated column by using my Date columnAfter conversion my Table have All date's infoAfter conversion my Table have All date's infoFor ex, I am using bar chart for displaying purpose my data. One thing observe here months are showing April is starting month. So next we want Jan to DecFor ex, I am using bar chart for displaying purpose my data. One thing observe here months are showing April is starting month. So next we want Jan to DecBy using MonthNumber Column we are soring monthName Column (See top of bar we have one option)By using MonthNumber Column we are soring monthName Column (See top of bar we have one option)Finally I Changed monthName column to MonthNumber columnFinally I Changed monthName column to MonthNumber column

v-lili6-msft
Community Support
Community Support

hi, @CloudMonkey 

You could create a custom date hierarchy then use it in the visual.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ani1991
Resolver III
Resolver III

Hi @CloudMonkey ,

 

Probably you can create a seperate mapping table like,
Month_Number        Month_name
1                                  January

2                                  February

3                                  March and so on
You can now connect this table to your fact table on Month_name column and then can pull the month number from this newly created table.

 

Thanks,

Anish

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.