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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Y axis having the same time scale

Hello, need some help, I have created a measure and format of the Y axis in “Time” But seems the Y axis showing the same time.

 

Yagevendra_0-1694702409764.png



Both the lines having the same time for particular date in data.

Measure I have written to achieve this :-
A (Yellow line) = HOUR(max(A[StartTime]))+MINUTE(MAX(A[StartTime])/60+SECOND(MAX(A[StartTime])))

B (Pink line) =
HOUR(MAX(B[EndTime]))+(MINUTE(MAX(B[EndTime]))/60+SECOND(MAX(B[EndTime])))

 

Format “Dynamic” This option I have enabled to making the Y axis in time.

Yagevendra_1-1694702409765.png

 



And the measure I have written to achieve the format in “hh:mm”ss” the same I have written for start and end time. Please find below screenshot for the reference.

""""&FORMAT(max(B[EndTime]),"hh:mm:ss")

Yagevendra_2-1694702409766.png

 

 

Not able to understand how its possible to getting the same Y axis scale and if difference in line in values for the particular date it should show the time accordingly.

 

5 REPLIES 5
Anonymous
Not applicable

@lbendlin, Would it be possible for you to provide the code of this visual? How did you write a code to show time and date.

{
  "data": {"name": "dataset"},
  "encoding": {
    "x": {
      "field": "Date",
      "type": "temporal"
    }
  },
  "layer": [
    {
      "mark": {"type": "line"},
      "encoding": {
        "y": {
          "field": "End Time",
          "type": "temporal"
        }
      }
    },
    {
      "mark": {"type": "line"},
      "encoding": {
        "y": {
          "field": "Start Time",
          "type": "temporal"
        }
      }
    }
  ]
}

 

lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Anonymous
Not applicable

Hi @lbendlin, Unable to upload PBIX file here.

Please find sample data to create simple line chart.

Start TimeEnd TimeDate

9:13:379:13:379/17/2023
12:12:3012:12:309/18/2023
15:25:4015:25:409/19/2023
20:11:0120:12:019/20/2023
01:05:0301:10:509/21/2023


Mesure needs to be build.

End (Time) = HOUR(MAX('Table'[End Time])+MINUTE(MAX('Table'[End Time])+SECOND(MAX('Table'[End Time]))))
 
Start (Time) = HOUR(MAX('Table'[Start Time])+SECOND(MAX('Table'[Start Time])+SECOND(MAX('Table'[Start Time]))))

Line chart should have Y axis in proper format. Find Cunnret format of the line chart.
Yagevendra_0-1695016943664.png


I used code to wrrite format in Y axis for Start and End time.

""""&FORMAT(MAX('Table'[Start Time]),"hh:mm:ss") &""""

Hope this sample data and code works for your. Looking forward from your response.

With the standard line chart visual the best you can do is convert the time into a duration.  Then the cart looks like

lbendlin_0-1695048006508.png

To have a true time Y axis you will likely need to use custom visuals like Deneb.

lbendlin_1-1695048650305.png

 

 

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors