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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.