How can I display a chart when two different time formats are in Google sheet table - google-visualization

The table in this spreadsheet has Start time (B3:B6), End time (D3:D6) and Total time (C3:C6). Total time is a length of hours, so its unit should not be AM/PM. But when I insert a chart with the Total time formatted without AM/PM displayed, the formatting of the X-Axis starts to include a date (12/29/1899...). Can this be corrected through chart settings or via a formula?
Toggling throught the formatting of C4:C6 changes the display back and forth on the Chart.
The shared spreadsheet is here.
Another related question to customizing the time value is here.

Related

Converting decimal time to hours to plot a 24-hour timeline chart in power bi

hope you're doing well.
I'm a newbie to PowerBI and I'd want to convert the decimal time/date column values into hours of the time to plot the info over a 24-hour timeline. I was able to achieve this in tableau and as it automatically detects the hours and can easily be able to plot the info. I was a bit close in achieving this in powerBI as I converted the date/time column to time and tried plotting but there's huge noise and looks more cluttered as it took every change in seconds/minutes (the bottom snippet). I've attached the snippets for reference, can anyone pls try to help me on this ?
In Power BI it's recommended to split the DateTime column into separate Date and Time columns. This is both for performance reasons. Over a year a DateTime column with 1sec granularity can have 30M different values, which is much more data than storing one column with 365 values, and one with 86,400 values. And so that your Date column can link to a Date Dimension to provide other DateTime hierarchy attributes, like FiscalQuarter, DayOfWeek, etc.
In Power Query select the DateTime column and go to --> Add Column --> Time -- > Time Only. Then change the data type of the DateTime column to Date.
This also solves your reporting problem as you can simply put the Time column on the X axis.
If you want a custom format string for the time you can add a calculated column in Power Query like
= Table.AddColumn(#"Changed Type1", "TimeDesc", each DateTime.ToText(#date(2020,1,1)&[Time], [Format="h tt"]))
And configure the new column with a "Sort by Column" of Time.

PowerBI measure calculates average incorrectly - why?

To preface this, I'm fairly experienced in Excel and VBA but new to PowerBI and more than a bit confused.
I have a flat table with a [creationdate]-, [Prio] (Priority (1,2,3)) and a calculated [Days Open] column, among many irrelevant others. I need to create a chart that displays the average days a case was open by priority of the case.
To display the average "days required" per (opening-) month for the past 18 months, I created the following measure:
Prio 1 = CALCULATE(AVERAGE('SourceName'[Days Open]),'SourceName'[Prio]=1)
Then I used that as a value, and used the [creationdate] as the x-axis. (Later I changed the x-axis to a new date table linked to [creationdate] without it making a difference.) To display this as monthly averages, I used the hierarchy limited to years and months, and went down one level in the chart.
Something seemed off so I checked first in Excel, then in the data source in PowerBI and yep: The averages in the PowerBI chart are complete bullshit.
Where did I go wrong? I assume it has something to do with the date hierarchy... So I created a date table as recommended (which....why?!) and linked it. That didn't make a difference.
Meanwhile in the data panel if I filter by the date column and calculate the average with the filtered selection of numbers externally, everything works as expected, so its not like there's a date formatting issue.
Do I have to create a calculated column with something akin to
DATE(YEAR([DateColumn]),MONTH([DateColumn]),1)
, then use that as the x-axis without the hierarchy, and hope nobody cares about the day in the label? Or is there something wrong with the measure used? I'm completely lost.

Running Total By Date in Visualization

I'm trying to create a line chart visualization that shows a constantly increasing sum over time. I think this would be called a cumulative total or a running total, but most of the questions I've seen on here have been about showing a total at the bottom of a matrix, subtotals, etc. Instead, I just want to visualize the units from the previous date being added to the current date, and so on. Not sure if this would be a custom column in the dataset or if there is an existing function for this.
Any help is appreciated. Thanks!
Goto Quick Measures, in the "Calculation" dropdown, select "Totals - Running Total", pull in Base Value (what you want to aggregate) and Field (probably your calender) and here you are!

Two different date ranges driven by a single slicer?

My data source is a list of events. There is one column with a timestamp, and other columns are attributes (type, location, severity, etc) of that event. I would like to produce a "weekly report".
Most of the charts on this report will be based on the events that occurred in the user-selected week. Example: column chart showing count of events per location. Other charts are to show the current week's counts compared to previous weeks. Example: line chart showing the total count of events in each of the last 12 weeks
I believe I can achieve this by having two separate slicers, one for selecting the dates of the current week, the other to select the comparison range, and each chart linked to the appropriate slicer. Ideally, however, the user would be able to select a single range (e.g. the week of the report) and the second set of charts would be relative to it. Is this possible?
I produced the following example using 2 slicers, both referencing the Date field, but one slicer for each chart. I want both charts controlled by a single slicer:

Google charts visualization: Timeline - full timestamp

Is there a way the hover state to show the full timestamp including year, month, day, hour and min? Something like 2013-Oct-06 13:32
At the moment the hover state shows different parts of the timestamp depending on the resolution of the graph.
Here are the docs for the visualization:
https://google-developers.appspot.com/chart/interactive/docs/gallery/timeline
I manage to think of workaround of this limitation.
What I did is to place the time string formatted exactly as I wanted to be as the bar label for the time period. Since the bar label is present on the first row of the tool-tip, this solves the issue very nicely.