Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
lian96022
Frequent Visitor

Stacked Bar Chart and Legend

I have a stacked bar chart where I would like the legend to use a date field. When I drag it to the Legend and click on "Date Hierarchy" it shows me the year but not the month. How do I get it to show me the month?

1 ACCEPTED SOLUTION

Hi @lian96022 

Create a month column, add this column in the legend

month = MONTH([date])

8.png

Add [year] in the slicer, so you can view the visual more clearly.

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
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

3 REPLIES 3
lian96022
Frequent Visitor

It does not reflect the same options. When I drag my date to "Axis" I get all the options. However when I drag it to "Legend" I only get Year...which I am wanting to get Month.

 

Screenshot.png

Hi @lian96022 

Create a month column, add this column in the legend

month = MONTH([date])

8.png

Add [year] in the slicer, so you can view the visual more clearly.

 

Best Regards
Maggie

 

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

parry2k
Super User
Super User

@lian96022 if it show date hierarchy in the table, grab the month and use it on the legend.



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.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.