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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
sclencioco
Helper I
Helper I

line graph including time difference as y axis

Hello,

 

Can you help me create a visualization(line graph) with time difference on Y-Axis and Date on X-axis. Below is my data for your reference

 

Capture062717.JPG

8 REPLIES 8
v-yulgu-msft
Employee
Employee

Hi @sclencioco,

 

If I understand correctly, you need to show the values of column [time diff] on Y-axis, grouped on date column which is added on X-axis, right?

 

Actually, it is not possible to achieve that. Because Y-axis only supports numeric values. If you add time value or text value, it will show Count/Count(distinct) value by default. In your scenario, you could convert your time diff to seconds or hours, then add it to Y-axis.

 

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,

 

So I need to split start_on and end_on to get the date and time to be used on line graph?

Hi @sclencioco,

 

I noticed that there is a column named as [time diff] in source table, you could convert its values from HH:MM:SS to integer (seconds/hours/minutes).

 

 

To add date values on X-axis, you could extract the date part from date/time first.

 

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,

 

I created [time diff] as MEASUREMENT. How can I make it an integer? Using Data type will do?

 

Thank you.

Saldie

Hi @sclencioco,

 

Have you resolved the problem now? If so, would you please kindly mark the corresponding reply as an answer or sharing your resolution so that it can benefit more users? If you still have any question, please feel free to ask.

 

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 @sclencioco,

 

Not sure how you created the measure for [time diff]. But you could try this to calculate the time difference in hours/minutes/seconds.

 

Hour diff = DATEDIFF(MAX(Table_name[START_ON]),MAX(Table_name[END_ON]),HOUR)

Minute diff = DATEDIFF(TMAX(able_name[START_ON]),MAX(Table_name[END_ON]),MINUTE)

Second diff = DATEDIFF(MAX(Table_name[START_ON]),MAX(Table_name[END_ON]),SECOND)

 

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.
vanessafvg
Super User
Super User

@sclencioco  what are you actually asking for, have you not tried to do this yourself?  what are you struggling with exactly?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hello, I tried it but i can not get my expected output.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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