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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
mmm_a012345
Regular Visitor

I want to set the value itself on the y-axis of a line graph

I would like to create a line graph with the x-axis set to date and time and the y-axis set to time (hh:mm).

I would like to know the time trends from this graph.

However, when I create a graph, the y-axis displays count values instead of time values.

 

How should I solve this?

The type of the time column is "time". I also tried the "text" type, but the result was the same.

 

mmm_a012345_0-1695797523341.png

 

Settings other than count cannot be made.

mmm_a012345_1-1695797608230.png

 

 

I want to create a graph like this.↓

mmm_a012345_2-1695797914226.png

 

5 REPLIES 5
ChiragGarg2512
Super User
Super User

@mmm_a012345 share some data in tabular form.

@ChiragGarg2512 

thank you for your reply.

 

The data in tabular format is below.

place_namedatetime1
aaaa2022/9/1218:10
aaaa2022/9/1219:35
aaaa2022/9/136:10
aaaa2022/9/1318:30
aaaa2022/9/1318:45
aaaa2022/9/146:45
aaaa2022/9/1418:00
aaaa2022/9/1418:30
aaaa2022/9/157:00
aaaa2022/9/1518:30
aaaa2022/9/1518:45
aaaa2022/10/128:30
aaaa2022/10/1217:10
aaaa2022/10/1317:25
aaaa2022/10/137:10
aaaa2022/10/1317:30
aaaa2022/10/1418:30
aaaa2022/10/146:45
aaaa2022/10/1417:00
aaaa2022/10/1517:30
aaaa2022/10/157:00
aaaa2023/4/1218:10
aaaa2023/4/1219:25
aaaa2023/4/136:10
aaaa2023/4/1318:30
aaaa2023/4/1318:45
aaaa2023/4/146:45
aaaa2023/4/1418:00
aaaa2023/4/1418:30
aaaa2023/4/157:00
aaaa2023/4/1518:30
aaaa2023/4/1518:45
aaaa2023/8/128:30
aaaa2023/8/1217:10
aaaa2023/8/1317:25
aaaa2023/8/137:10
aaaa2023/8/1317:30
aaaa2023/8/1418:30
aaaa2023/8/146:45
aaaa2023/8/1417:00
aaaa2023/8/1517:30
aaaa2023/8/157:00
bbbb2022/11/1218:10
bbbb2022/11/1219:35
bbbb2022/11/136:10
bbbb2022/11/1318:30
bbbb2022/11/1318:45
bbbb2022/11/146:45
bbbb2022/11/1418:00
bbbb2022/11/1418:30
bbbb2022/11/157:00
bbbb2022/11/1518:30
bbbb2022/11/1518:45
bbbb2022/12/128:30
bbbb2022/12/1217:10
bbbb2022/12/1317:25
bbbb2022/12/137:10
bbbb2022/12/1317:30
bbbb2022/12/1418:30
bbbb2022/12/146:45
bbbb2022/12/1417:00
bbbb2022/12/1517:30
bbbb2022/12/157:00
bbbb2023/6/1218:10
bbbb2023/6/1219:25
bbbb2023/6/136:10
bbbb2023/6/1318:30
bbbb2023/6/1318:45
bbbb2023/6/146:45
bbbb2023/6/1418:00
bbbb2023/6/1418:30
bbbb2023/6/157:00
bbbb2023/6/1518:30
bbbb2023/6/1518:45
bbbb2023/8/128:30
bbbb2023/8/1217:10
bbbb2023/8/1317:25
bbbb2023/8/137:10
bbbb2023/8/1317:30
bbbb2023/8/1418:30
bbbb2023/8/146:45
bbbb2023/8/1417:00
bbbb2023/8/1517:30
bbbb2023/8/157:00

 

If you graph it, it will look like this:

mmm_a012345_0-1695805781549.png

 

Please tell me how to solve it.

@mmm_a012345 ,  Time cannot be plotted on y axis, so what can be done is create a column that can calculate minutes into that day, like 6:10:00 is 370 minutes.

 

After adding the minute column[ 

minutes = HOUR('Table (6)'[time1])*60 + MINUTE('Table (6)'[time1]) + SECOND('Table (6)'[time1])/60] and plotting sum of minutes on y-axis and dates on x-axis. Change the type to categorical in x-axis in format visual, this will give a graph like this[don't forget to apply legend]
 
ChiragGarg2512_0-1695836065699.png
 

 

With the help of slicer it can look like
ChiragGarg2512_1-1695836117424.png

 

 

This is the maximum that I am able to create near your requirement. 

Thank You.

@ChiragGarg2512 

 

Thank you for your wonderful answer.

 

However, "time" refers to the time (a.m. or p.m.), not elapsed time.

6:10:00 cannot be 370 minutes.

I would like to express it in the form of 6:10.

 

thank you.

@mmm_a012345 , That can not be done for y axis in any chart. The time can be expressed as minutes in the terms how many minutes have passed in that day. There can be card visual that represents time. Whenever a point on line graph is selected the corresponding time will be shown on card.

 

Sorry if I couldn't help at all and Thank you for taking time to read. I hope that this gives you some insight into powerBI

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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