Forum Discussion
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?
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:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- AnonymousNot applicable
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
- v-alq-msft
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:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- RoyAndreyRSRegular VisitorDiferencia_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])RETURNABS( DifYear * 360 + DifMonth * 30 + DifDay)