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
Rich_P_G
Helper I
Helper I

X-Axis Duplicating Date

Hello All,

 

I am having a strange issue I haven't encountered before in Power BI Desktop. I have a bar graph with the X-Axis using Dates and the Type set to categorical. 

 

I am getting this result: 

Rich_P_G_0-1572359978868.png

 

September 2018 is appearing twice. The underlying data doesn't show any reason why September 2018 might be a problem:

Rich_P_G_1-1572360093096.png

 

Any ideas on how to correct this?

 

Thank you in advance!

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Rich_P_G 

As tested, if the original data is as below

date value
8/1/2019 1
9/1/2019 2
9/2/2019 3
10/1/2019 4
11/1/2019 5

Then in Power BI, change the "type" of "date" column to MMMM YYYY,

select categorical type for X-axis,

Capture11.JPG

To solve this problem, I add a calculated column as below

Column = FORMAT([date],"mmmm yyyy")

Capture12.JPG

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

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Rich_P_G 

As tested, if the original data is as below

date value
8/1/2019 1
9/1/2019 2
9/2/2019 3
10/1/2019 4
11/1/2019 5

Then in Power BI, change the "type" of "date" column to MMMM YYYY,

select categorical type for X-axis,

Capture11.JPG

To solve this problem, I add a calculated column as below

Column = FORMAT([date],"mmmm yyyy")

Capture12.JPG

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.

This worked. Thank you!

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.