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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AnetaK
Helper V
Helper V

DAYS360 in PBI

Hello,

I need to replicate a function 360DAYS from Excel. 

What function should I use in PBI (preffered in Power Query) to receive values from column DAYS?

Przechwytywanie.PNG

 

 

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @AnetaK 

 

In Power Query, you may create a custom column with the following codes. The pbix file is attached in the end.

 

=Duration.Days([End]-[Start])

 

Result:

c1.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @AnetaK 

 

In Power Query, you may create a custom column with the following codes. The pbix file is attached in the end.

 

=Duration.Days([End]-[Start])

 

Result:

c1.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Diferencia_Dias360 =
VAR DifYear = YEAR('Table'[Start]) - YEAR('Table'[End])
VAR DifMonth = MONTH('Table'[Start]) - MONTH('Table'[End])
VAR DifDay = DAY('Table'[Start]) - DAY('Table'[End])

RETURN
   ABS( DifYear * 360 + DifMonth * 30 + DifDay)Dias360 Days360  Excel.jpg
harshnathani
Community Champion
Community Champion

Hi @AnetaK ,

 

You cna have a look at this blog

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/DAYS360/m-p/1062952

 

 

and For Days

 

You can create a Calculated Column

 

Dayss =
DATEDIFF (
    'Table'[Start],
    'Table'[End],
    DAY
)

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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