Reply
stribor45
Post Prodigy
Post Prodigy
Partially syndicated - Outbound

Showing Month and Year

I am trying to show a year number beside the month name but not having luck. As of now seems that my January is bunched up (January 2022 and January 2023) inside January. How would the visual show me a separate bar for January 2022 and a separate one for 2023?

 

Thanks

 

stribor45_0-1684941405353.png

stribor45_1-1684941420001.png

 

1 ACCEPTED SOLUTION
vk_pbi
Resolver II
Resolver II

Syndicated - Outbound

Hi @stribor45 

You should use custom date table to achieve all these options.

 

Under modelling tab, click New Table and paste this code

Dates = 
ADDCOLUMNS(
    CALENDERAUTO(),
    "Month No", MONTH([Date]),
    "Year No", YEAR([Date]),
    "Month Name", FORMAT([Date], "mmm"),
   "Month Year", FORMAT([Date], "mmm-yyyy")
)

Establish relationship between your fact table and this table. Now you can drag Month Year to axis in the chart.

You can find more videos on youtube 

View solution in original post

1 REPLY 1
vk_pbi
Resolver II
Resolver II

Syndicated - Outbound

Hi @stribor45 

You should use custom date table to achieve all these options.

 

Under modelling tab, click New Table and paste this code

Dates = 
ADDCOLUMNS(
    CALENDERAUTO(),
    "Month No", MONTH([Date]),
    "Year No", YEAR([Date]),
    "Month Name", FORMAT([Date], "mmm"),
   "Month Year", FORMAT([Date], "mmm-yyyy")
)

Establish relationship between your fact table and this table. Now you can drag Month Year to axis in the chart.

You can find more videos on youtube 

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)