Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DamienJ
Frequent Visitor

Line Graph Showing Progression Of Time Over A Date Range

Hi,

 

I have a data set similar to the below:

 

Date DD/MM/YYYY / Time HH:MM:SS

 

01/01/201700:45:00
12/03/201700:44:31
21/05/201700:43:51
15/07/201700:46:01
08/08/201700:44:15

 

I'm trying to create a line graph to show the progression of time over the year that would look similar to the following highly technical image: (X axis scrawl is J F M A for months, Y is time in mins)

 

Capture.PNG

 

But for the life of me I can't figure out how to mirror this in Power BI.  It will either count the number of times that the time appears in the dataset, or will count the total number of rows in the dataset.  Can anyone assist please?

 

Thanks

Damien 

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @DamienJ,

 

In a chart visual, only numeric values are allowed to be added to Y-axis. If we drag non-numerical fields into Y-axis, it will be counted automatically.

 

To achieve your requirement, you should first convert Time format filed to numerical type.

Time in minute = MINUTE('Date/Time'[Time])

 

Then, create a line chart like below.

1.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @DamienJ,

 

In a chart visual, only numeric values are allowed to be added to Y-axis. If we drag non-numerical fields into Y-axis, it will be counted automatically.

 

To achieve your requirement, you should first convert Time format filed to numerical type.

Time in minute = MINUTE('Date/Time'[Time])

 

Then, create a line chart like below.

1.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft and thanks for your reply.  That approach had never crossed my mind - thanks very much!  I did make a slight change to your suggestion as I needed the precision of seconds, and as the data is currently in Excel I used the following to convert the HH MM SS value to seconds: 

 

=HOUR(A2)*3600 + MINUTE(A2)*60 + SECOND(A2)

 

(Other sites suggested multiplying the value by 86400 but this gave erroneous results in some cases)

 

Your screenshot suggests Power BI will be very happy with these new numbers.  Thanks again!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.