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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
heardm
New Member

POWER Function with DATEDIFF

I want to raise a number to the power of the difference between two dates. All of my value columns are formatted as decimal number, and the difference between the dates is around 4, but I am getting this error when I try to make a Calculated column

 


"An argument of function 'POWER' has the wrong data type or the result is too large or too small."

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @heardm,

 

Based on my test in desktop version 2.47.4766.801 64-bit (June 2017), we can create a calculated column like below:

 

Column = POWER(DATEDIFF('Table2'[StartDate],'Table2'[EndDate],DAY),2)

 

Both [StartDate] and [EndDate] columns are date type.

 

q4.PNG

 

In your scenario, please run the same desktop version and create the same calculated column like us.

 

Besides, please go through the DATEDIFF() and POWER() functions carefully.

 

DATEDIFF Function (DAX)

POWER Function (DAX)

 

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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