Create time column for Line chart

Hey guys!

So I want to create a line chart that shows the sum of a total over the course of a 24 hour time period.

I have a timestamp column where I extracted the time but tbh it looks weird.

So I was thinking to improve the chart, is to create a column that include all time over a 24 hour period (not military time) and have the metric fall amongst trendline the metric occurred.

Any suggestions? I may be overthinking this.

Tagged:

Best Answer

  • JasonAltenburg
    edited January 2022 Answer ✓


    Hi @leeloo_dallas

    I think you are correct in creating a new column in your dataset that includes the date/times you want to show in the 24 hour period, even where there is no quantity of likes.

    I have attached a couple images to show what I think is your desired output and the data that is powering it, which I set up as a table with a row for each minute of a day, and then entered like quantities in random areas.


    I think you already had this selected in your image above, but I selected Hide Empty Values in the chart options as well.

Answers

  • Hi @leeloo_dallas are you trying to show all data from the past 24 hours, or a summary of your metric across multiple days?

    If it is just the past 24 hours, you do not have to extract the time from your datetime column. You can just set the timestamp as your x-axis, then set the date range to "Previous 24 Hours" with Graph by as "None".

  • Hi @MichelleH

    I'm trying to show everything over a 24 hour period over the course of the day for the last 24 hours.

    I realize it's not a timestamp column and is a date column, since it doesn't include seconds.

    So the option for last 24 hours isn't available.

  • JasonAltenburg
    edited January 2022 Answer ✓


    Hi @leeloo_dallas

    I think you are correct in creating a new column in your dataset that includes the date/times you want to show in the 24 hour period, even where there is no quantity of likes.

    I have attached a couple images to show what I think is your desired output and the data that is powering it, which I set up as a table with a row for each minute of a day, and then entered like quantities in random areas.


    I think you already had this selected in your image above, but I selected Hide Empty Values in the chart options as well.

  • Thanks @JasonAltenburg this worked well for me