Forum Discussion

Rich_P_G's avatar
Rich_P_G
Icon for Helper I rankHelper I
6 years ago
Solved

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: 

 

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

 

Any ideas on how to correct this?

 

Thank you in advance!

  • 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,

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

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

    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.

2 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Icon for Community Support rankCommunity 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,

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

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

    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.