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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.