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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
addd123
Frequent Visitor

Line chart using hours minutes seconds (timeline)

Hi, 

 

I would like to create a timeline using  the hours minutes seconds from the DATETIME datatype. Unfornunatly the most detailed the graph will go is Days... 

 

How can i use the hours minutes seconds to create a graph?

 

Thank in advance, 

Ad

 

 

 

1 ACCEPTED SOLUTION
v-xjiin-msft
Solution Sage
Solution Sage

@addd123

 

In your scenario, did you mean that you want the Datetime data type data to only display the times and use these times as Y Axis in line chart?

 

If so, as I know current Power BI does not support times as Y Axis values.

 

And if you mean you just want to use times as X Axis values. Then you can try following method to format your datetime data to time:

 

Go to Data pane, choose your datetime column => Go to Modeling and you’ll see there’s Data Type and Format. Change it to Time and select the format you want.

1.PNG2.PNG

 

If you want to get the separated Hours, Minutes or Seconds one by one. Then I would suggest you to create calculated column with DAX functions:

 

https://msdn.microsoft.com/en-us/library/ee634786.aspx?f=255&MSPPError=-2147217396

 

Thanks,
Xi Jin.

 

View solution in original post

2 REPLIES 2
pbiinterel
Frequent Visitor

Hi I am facing a issue in plotting a line chart. The requirement is that the user need to monitor the room temperature and set temperature during various hours of a day. They also have a third parameter which is a fan speed. The values of fan speed can be from 0-5. The graph needed as as follows. 

 

The events are marked in hh:mm:ss format in the database.

Event 14 Dashboard.jpg

For the purpose of viewing we are showing the data in only hour and the final level drill down is minutes. So when the data is plotted it is plotted in the minute level and then rolled up to hour level. What the system does is it takes the average of all the data in the minute level and then plots it in the hour level. Similarly if there are more changes within a minute the average in the  minute is taken. But we are considering only hour and minutes for our dashboards. So when we drill down to the  minute level we get the actual data and in the hour we get an average data. I do understand that the average is fine for temperature . But not for the fan speed. I have created a date dimension and a time dimension. Date is in the filter and time is in the hour It is very urgent pls help regards pbi

v-xjiin-msft
Solution Sage
Solution Sage

@addd123

 

In your scenario, did you mean that you want the Datetime data type data to only display the times and use these times as Y Axis in line chart?

 

If so, as I know current Power BI does not support times as Y Axis values.

 

And if you mean you just want to use times as X Axis values. Then you can try following method to format your datetime data to time:

 

Go to Data pane, choose your datetime column => Go to Modeling and you’ll see there’s Data Type and Format. Change it to Time and select the format you want.

1.PNG2.PNG

 

If you want to get the separated Hours, Minutes or Seconds one by one. Then I would suggest you to create calculated column with DAX functions:

 

https://msdn.microsoft.com/en-us/library/ee634786.aspx?f=255&MSPPError=-2147217396

 

Thanks,
Xi Jin.

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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