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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Need End Time from next entry's Created Time

I have a table with new entries every time the status of a machine is updated. A Created Time is automatically added when a new entry is created. What I would like to make is a column for End Time. It should be the Created Time for the next entry for that particular machine. Any help would be greatly appreciated!

 

Carlislej2830_0-1639668489105.png

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this:

 

 

END Time =
VAR _A = [Created]
VAR _End =
    CALCULATE (
        MIN ( 'Table'[Created] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Machine] = EARLIER ( 'Table'[Machine] )
                && 'Table'[Created] > _A
        )
    )
RETURN
    _End

 

 

 

if the output you are looking is as follow:

VahidDM_5-1639698163011.png

 



If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

 

 

 

View solution in original post

5 REPLIES 5
VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this:

 

 

END Time =
VAR _A = [Created]
VAR _End =
    CALCULATE (
        MIN ( 'Table'[Created] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Machine] = EARLIER ( 'Table'[Machine] )
                && 'Table'[Created] > _A
        )
    )
RETURN
    _End

 

 

 

if the output you are looking is as follow:

VahidDM_5-1639698163011.png

 



If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

 

 

 

Anonymous
Not applicable

@VahidDM thanks for the response! I just got back to the office and tried this, and I got this error for Line 8:

 

A single value for column 'Machine' in table 'Table' cannot be determined.

 

Any suggestions on what I'm still doing wrong?

Anonymous
Not applicable

@VahidDM I figured it out! It was me being stupid. But now I'm slightly less stupid! Thanks for the help!

smpa01
Super User
Super User

@Anonymous  

It should be the Created Time for the next entry for that particular machine - what is the logic for calcuating that

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Anonymous
Not applicable

It's from a SharePoint list. So someone creates an entry (e.g. for machine 1), and it has a created time. Then the next time the status changes, they create a new entry for machine 1, and that also has a created time. There could be entries for other machines between there, so it needs to be the next entry for the same machine.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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