Forum Discussion
Coelijoeli
10 years agoAdvocate I
Calculate date difference
Hello Community, I am looking for a way to find the difference between two dates. I tried te following example: Date1 - Date2 This does not give me the difference... this gives me a weird da...
- Anonymous10 years ago
There was just a recent thread on this. Depending on what you need to do there are several solutions.
My quick solution:
diff = 1.0*([Closed]-[TransactionDate])
SamsonAnalytics
6 years agoFrequent Visitor
Use this code in a new column:
_DateDiferrence =
VAR
Sum_Date=Calculate(sumx('TableName','TableName'[DATE1]-'TableName'[DATE2]))
RETURN
if(sum_Date>=0,Sum_Date,0)
I hope it works for you
- Anonymous5 years agoNot applicable
how would this look if you want to calculate the average for eg products?
and how would this look if the dates are on two different columns?
thank you in advance,Niki