Forum Discussion
Coelijoeli
10 years agoAdvocate I
Days between two dates columns
Hello community, I'm building a dashboard with Power BI Desktop. I've connected a SQL server database which has two date fields: [Transactiondate] [Closed] What I want to do is get the ...
HarrisMalik
10 years agoContinued Contributor
gkhare there is a mistake in your formula the third argument to DATEDIFF is Interval not function. Use following formula:
DaysLenght = DATEDIFF(AA_SALES_FACT[CLOSE_DATE],AA_SALES_FACT[START_DATE],DAY)
Edit: I do not know your data model just to be sure the first argument of DATEDIFF() is Start Date, second is End date and third is interval i.e. DAY, MONTH,YEAR etc
DATEDIFF(<start_date>, <end_date>, <interval>)
WendyMc
10 years agoNew Member
Thanks for posting - just what I was looking for