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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Leslie1015
Frequent Visitor

Need Help Creating Start and End Date Column in Power BI

Hi everyone,

 

I'm new to power BI, can somebody help me on how to create a start and end date in power BI.

This is the data I have

 

Date
Wed, 01 Mar 2023 07:00:53
Wed, 01 Mar 2023 07:01:12
Wed, 01 Mar 2023 07:01:23
Wed, 01 Mar 2023 07:01:31
Wed, 01 Mar 2023 07:07:30
Wed, 01 Mar 2023 07:09:06

 

I want the output to be like this

DateStart date End Date
Wed, 01 Mar 2023 07:00:53Wed, 01 Mar 2023 07:00:53Wed, 01 Mar 2023 07:01:12
Wed, 01 Mar 2023 07:01:12Wed, 01 Mar 2023 07:01:12Wed, 01 Mar 2023 07:01:23
Wed, 01 Mar 2023 07:01:23Wed, 01 Mar 2023 07:01:23Wed, 01 Mar 2023 07:01:31
Wed, 01 Mar 2023 07:01:31Wed, 01 Mar 2023 07:01:31Wed, 01 Mar 2023 07:07:30
Wed, 01 Mar 2023 07:07:30Wed, 01 Mar 2023 07:07:30 
Wed, 01 Mar 2023 07:09:06Wed, 01 Mar 2023 07:09:06 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Leslie1015,

You can create two calculate columns to achieve your requirement. The start date reference from the raw date field, the end date use current index field value to lookup the next row date value.

StartDate= 'Table'[Date]

EndDate = 
    CALCULATE(
        MAX('Table'[Date]),
        FILTER(
            ALL('Table'),
            'Table'[Index] = EARLIER('Table'[Index]) + 1
        )
    )

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Leslie1015
Frequent Visitor

i forgot to add the Index Field. So, Ihave the date and the Index. I just need to get atleast the End Date. Can somebody help me please

  Output I want
DateIndexStart Date End Date
Wed, 01 Mar 2023 07:00:530Wed, 01 Mar 2023 07:00:53Wed, 01 Mar 2023 07:01:12
Wed, 01 Mar 2023 07:01:121Wed, 01 Mar 2023 07:01:12Wed, 01 Mar 2023 07:01:23
Wed, 01 Mar 2023 07:01:232Wed, 01 Mar 2023 07:01:23Wed, 01 Mar 2023 07:01:31
Wed, 01 Mar 2023 07:01:313Wed, 01 Mar 2023 07:01:31Wed, 01 Mar 2023 07:07:30
Wed, 01 Mar 2023 07:07:304Wed, 01 Mar 2023 07:07:30Wed, 01 Mar 2023 07:09:06
Wed, 01 Mar 2023 07:09:065Wed, 01 Mar 2023 07:09:06 
Anonymous
Not applicable

Hi @Leslie1015,

You can create two calculate columns to achieve your requirement. The start date reference from the raw date field, the end date use current index field value to lookup the next row date value.

StartDate= 'Table'[Date]

EndDate = 
    CALCULATE(
        MAX('Table'[Date]),
        FILTER(
            ALL('Table'),
            'Table'[Index] = EARLIER('Table'[Index]) + 1
        )
    )

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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