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
Anonymous
Not applicable

month year

Hello Expert,

i have used funciton for creating month year calculation but how to add this into hirarchy to get unique results

Format('Table 3'[Date],"MMM-YY")

Shree

1 ACCEPTED SOLUTION
Anonymous
Not applicable

It seems Youa re formating as Text. so Power BI will not detect this as Date to display as Hierarchy.

Format('Table 3'[Date],"MMM-YY")

 

Add another column

Test1 = DATES[Date] then Set DataType as Date/Time 
Format: March 2001 (MMMM yyyy)

 

You might find this below link useful.

https://community.powerbi.com/t5/Power-Query/Date-Display-Formats/td-p/2145

 

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@Anonymous can you explain bit more what you mean by adding to hierarchy?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

this is calendar table script

Table2 = CALENDAR(DATE(2016,1,1),DATE(2019,12,31))

from which i am able to get readily avl  hirerarchy but how to add newly created above column into that so that i will get month and year also hirerarchy

 

shree

Anonymous
Not applicable

Hello Expert,
1st step to create calendar using below mentioned scripts . which will give hirachy also

Table2 = CALENDAR(DATE(2016,1,1),DATE(2019,12,31))

2nd step create a column 
Format('Table 3'[Date],"MMM-YY")

and add month- year column in hirarchy or tell me the alternate step where we can add month-year column in hirarchy

 

Shree

 

Anonymous
Not applicable

suggestions pls

Anonymous
Not applicable

It seems Youa re formating as Text. so Power BI will not detect this as Date to display as Hierarchy.

Format('Table 3'[Date],"MMM-YY")

 

Add another column

Test1 = DATES[Date] then Set DataType as Date/Time 
Format: March 2001 (MMMM yyyy)

 

You might find this below link useful.

https://community.powerbi.com/t5/Power-Query/Date-Display-Formats/td-p/2145

 

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.