Forum Discussion
ehwood
8 years agoRegular Visitor
Finding Time Between Dates Based on ID
Hello Experts of the Power BI Community, Please go easy on me as I'm new with DAX. I hope this isn't a terrible question, but I've been struggling to come up with a solution to my problem. I ...
- 8 years ago
Hi,
This calculated column formula works. You may download my PBIX file from here.
=if(ISBLANK(CALCULATE(MAX(Data[Date]),FILTER(Data,Data[Customer ID]=EARLIER(Data[Customer ID])&&Data[Date]<EARLIER(Data[Date])))),BLANK(),[Date]-CALCULATE(MAX(Data[Date]),FILTER(Data,Data[Customer ID]=EARLIER(Data[Customer ID])&&Data[Date]<EARLIER(Data[Date]))))
Hope this helps.
ehwood
8 years agoRegular Visitor
Wow!
That is exactly what I was looking for.Thank you so much for your help!
Ashish_Mathur
Super User
8 years agoYou are welcome.