0

I need to visualize time data in Power BI Desktop from an Excel table, but the data is incorrectly visualized. In Excel I can simply select the table and create a graph from it, but Power BI seems to have a different approach to this kind of data and I can not figure out how to do it properly. Below is a detailed explanation of what I do and what is the result.

I have a simple table in an Excel file. There are two columns, Week and Connection time. Excel table

When I import this table into Power BI Desktop, I press on the Transform data before loading it. At first, it looks like this: Power BI table before type change I can already see, that the time values that overlap 24 hours are shown incorrectly. For example instead of seeing 27:00:00 (week number 12) I see 01.01.1900 03:00:00.

Now if I go to the Transform tab at the top and change the data type from Integer to Hour (or Time, "hour" is a direct translation from Polish, I'm not sure how it is labeled in english version of PBI) it shows the hour values that are lower than 24 hours correctly, but the ones that overlap 24h limit are shown incorrectly, e.g. the 27:00:00 is shown as 03:00:00. Power BI table after type change

Now when I import the data and try to visualise them, it shows the values as List of elements and on the graph they they are all shown as 1: Power BI D

I tried following different tutorials and asking the GPT master how to change it in the visualization tab but I can not find the correct approach.

My question is, what do I do incorrectly? I tried different time formats both in Excel and PBI but nothing seems to be working. I don't want to show the time as the moment in day that the event happend, because the value is representing the time spent during connection and it must be shown as an hour value. It can also be shown as a numeric value, but this would mean that in the main sheet which contains thousands of values I would have to find a way to automatically convert time into numeric values, which is also not a good way for me.

Have any of you already encountered such a case and found a solution? Maybe you have some tips on how to first input the data into the Excel file so then PBI can easily visualize them in a graph?

4
  • change data type to "duration"
    – RADO
    Commented Jul 3 at 11:33
  • What exactly do you mean by "duration"? I don't see this type of data both in excel and pbi. Commented Jul 3 at 11:52
  • in PowerQuery, under transform, there is type "duration". Google it.
    – RADO
    Commented Jul 3 at 12:15
  • Power BI cannot display times > 23:59:59. You need to use number. In Power Query, all you probably need to do, at the step you are showin in your screenshot, is to change the formula bar from type datetime to type number. Then in Power BI, it will display as a decimal number and you should be able to graph it. Commented Jul 4 at 0:00

0

Browse other questions tagged or ask your own question.