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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register 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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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