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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.