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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Bajdak
Frequent Visitor

Expected Date calculated Column

Hello,

 

i have two columns. "Startdatetime" and "Enddatetime". The data is connected to SQL and is connected via DirectQuery. This data is constantly changing as SQL is related to a running system. Sometimes it can be, that the Enddatetime is "1900-01-01" because the task is running and the Enddatetime is not defined.  "Startdatetime" can be also "1900-01-01", when the task is not startet. I need a calculated Column in Power BI, that is adding the Average of the Duration between "Startdatetime" and "Enddatetime" from the others Data to "Startdatetime" to the data, where Enddatetime is not defined.

As example:

The task on "02/25/2023" took about 5 hours. In the 5 hours the Enddatetime was "1900-01-01". Only when the task was over was the record updated. I need a Calculated Column like IF Enddatetime =1900-01-01 then calculate Startdatime + Average of other records else Enddatetime. The point is that you can predict the task with the average running time of others.

Bajdak_1-1677765409486.png

 

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@Bajdak ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.

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

I have updated the situation.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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