Forum Discussion
mblydt-hansen
8 years agoFrequent Visitor
Date difference between values in same column
Hi everyone! I'm still learning DAX and I was wondering if the collective minds of this forum could help me out with coding a custom column that I've been having difficulty with. I feel like my i...
- 8 years ago
You could use this calculated column
Column = VAR temp = TOPN ( 1, FILTER ( Table1, Table1[Patient ID] = EARLIER ( Table1[Patient ID] ) && Table1[Date of Visit] < EARLIER ( Table1[Date of Visit] ) ), [Date of Visit], DESC ) RETURN DATEDIFF ( MINX ( temp, [Date of Visit] ), Table1[Date of Visit], DAY )
sv11
7 years agoHelper I
Hi,
I have followed your footsteps to recreate this DAX script and the following errors are being popped out: (in Red)
Frequency = VAR temp = TOPN(1, FILTER( Freq, Freq[new_AdvisorCRD] = EARLIER(Freq[new_AdvisorCRD]) && Freq[new_Transaction_Date] < EARLIER( Freq[new_Transaction_Date]) ), Freq[new_Transaction_Date], DESC ) return DATEDIFF(MINX(temp, Freq[new_Transaction_Date]), Freq[new_Transaction_Date], DAY)
Do you minf revieing my code?
Thanks for your help
MAAbdullah_47
6 years agoHelper V
I have the same problem how you solve it?