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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
jaymanivannan
Frequent Visitor

Date function to add minutes

Hello,

I have a specific requirement with Date and Time. I need to display Event Start Date Time (This is avaialble in SQL server database) and Event Seating Time in Power BI Report.  Event Seating Time is should be a derrrived (calculation) measure in the report layer. The logical formula is, Event Seating Time= (Event Start Date Time - 30 minutes ). I am trying to create a measure with DATEADD function, but not able to add/ subtract minute. 

 

Please help me if any one came across this scenario. 

 

 

 

Thanks,

Mani

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Dear @jaymanivannan,

 

Yes, we can add minute. You can try step by step:

  1. Click "Edit Query" in the Home Tab
  2. Choose the table you want to addMins
  3. Leave Home tab, click Add column tab
  4. Click button "Custom colum" (see the picture below)
  5. "New column name" = Event Seating Time
  6. "Custom column formular":  [Event Start Date Time] - #duration(0,0,30,0)
  7. Click "Close & Apply" in Home Tab. Check your result (in my sample picture is +30 mins).

 

Regards,

ManNVSM.

 

image.png

image.png

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Dear @jaymanivannan,

 

Yes, we can add minute. You can try step by step:

  1. Click "Edit Query" in the Home Tab
  2. Choose the table you want to addMins
  3. Leave Home tab, click Add column tab
  4. Click button "Custom colum" (see the picture below)
  5. "New column name" = Event Seating Time
  6. "Custom column formular":  [Event Start Date Time] - #duration(0,0,30,0)
  7. Click "Close & Apply" in Home Tab. Check your result (in my sample picture is +30 mins).

 

Regards,

ManNVSM.

 

image.png

image.png

Hi @Anonymous - Thanks for the update. This solution works !! 

 

Regs,

Mani

 

Anonymous
Not applicable

   Glad to hear that 🙂

 

Regards,

ManNVSM.

 

Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @jaymanivannan

 

You might be able to use the TIME function to help.

 

The following code starts with 1st Jan, 2017, then adds 10 hours, 1 min, 1 second, then adds a further 1 minute to that.

 

Measure = DATE(2017,1,1) + TIME(10,1,1) + TIME(0,1,0)

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

@Phil_Seamark - Thanks for the reply Phil. This solution is not working. Let me try.

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.