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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
vincentllx
Regular Visitor

Modified StartDateTime and EndDateTime dynamically

Hi !

 

I'm kinda new to power Bi, and I'd like to know if i can do the following in Power Bi.

Note that I'm using DirectQuery to get my data. I can't create link between tables since all my data is integrated in a single table.

 

My situation:

I have events that start and end on a certain period like :

EventIdStartDateTimeEndDateTimeDurationSec
abc11/08/2021 10:40:21 AM11/08/2021 3:44:23 PM18242
def11/08/2021 11:55:10 PM12/08/2021 3:40:21 AM13511
ijk10/08/2021 10:40:21 PM11/08/2021 10:40:21 AM43200

 

I'm trying to create calculated columns to calculate the duration on a specific interval used as a filter.

Now I want to filter all these events on the 11th and to have their duration in sec as follow:

EventIdStartDateTime2EndDateTime2DurationSec2
abc11/08/2021 10:40:21 AM11/08/2021 3:44:23 PM18242
def11/08/2021 11:55:10 PM12/08/2021 12:00:00 AM290
ijk11/08/2021 12:00:00 AM11/08/2021 10:40:21 AM38421

 

Now lets admit I want to filter all these events on the 12th and to have their duration in sec as follow:

EventIdStartDateTime2EndDateTime2DurationSec2
abc11/08/2021 10:40:21 AM11/08/2021 3:44:23 PM0
def12/08/202112:00:00 AM12/08/2021 3:40:21 AM13221
ijk10/08/2021 10:40:21 PM11/08/2021 10:40:21 AM0

 

If I could have some hint to think this problem it would be higly appreciated ! Thanks 🙂 

1 REPLY 1
amitchandak
Super User
Super User

@vincentllx , Logic for the last table is not clear, few dates are changed, what is the logic behind that

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors