Forum Discussion

tomgag's avatar
tomgag
Resolver I
8 years ago
Solved

Single Stacked bar Chart - show data

Hi, I have the issue with the graph.

 

I guess I pinpoint the problem to my date / time column. The graph splits the data per day depending of the hour.

 

So my question is - how can I remove time from date/time column. I changed the type to date but it did not work.

 

You can see below that the type is date however the time is still there.

 

  • Hi tomgag

    I can reproduce your problem as below

     

    To solve this problem, one workaround is just as you said in the another post, resize the visual to a smaller one.

     

    Another way is to set "Type" of 'Axis" to be "Categorical" without resize the visual

     

    Additionally, the easliest way to use a date type column from a datetime type in the axis of the bar chart, just select "date type"->date to replace "date/time".

     

     

    Below is my test pbix.

     

    Best Regards

    Maggie

     

     

6 Replies

  • Johanno's avatar
    Johanno
    Continued Contributor

    Strange, I tried creating the corresponding table and when I went to Data -> Modeling -> Data type and changed to Date I only got the date as I should. Could you try to create a new calculated column using: 

    Date = Date(YEAR(Table1[Column1]);MONTH(Table1[Column1]);DAY(Table1[Column1]))

    where Column1 referes to your column with both date and time. Then set the Data type to Date to see if you get a different result.

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi tomgag

    Does this problem happen for a while or a long time?

    How about refresh the table?

    Or "save"->"close", then reopen the table.

     

    Best Regards

    Maggie

    • tomgag's avatar
      tomgag
      Resolver I

      I have it in the format as date but on the graph it shows time as well. It shows only 00:00 and 12:00 for each of the days! Any idea how to display only days.

      • Johanno's avatar
        Johanno
        Continued Contributor
        Have you tried what I wrote above and extract year, month and day?
  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi tomgag

    I can reproduce your problem as below

     

    To solve this problem, one workaround is just as you said in the another post, resize the visual to a smaller one.

     

    Another way is to set "Type" of 'Axis" to be "Categorical" without resize the visual

     

    Additionally, the easliest way to use a date type column from a datetime type in the axis of the bar chart, just select "date type"->date to replace "date/time".

     

     

    Below is my test pbix.

     

    Best Regards

    Maggie