Forum Discussion
Anonymous
7 years agoNot applicable
DAX Function To Compare 3 Different Dates-Timestamps Columns
Hi, Am using Powerpivot and I have 3 columns, each with date & time scans in them. The 3 columns occur in the exact sequence as shown below: (i.e. Job booking date occurs first, then Attempted Ac...
- Anonymous7 years ago
Yes that worked and powerpivot does include = at beginning by default.
Sorry its my first time seeing such a long formula and didn't know you could include variables in a formula which is awesome.
Thank you again for your help, much appreciated:)
- Anonymous7 years ago
AlB its ok I've managed to fix issue myself after some manual testing. Thanks again:)
AlB
Community Champion
7 years agoHi Anonymous
Try this
NewCol = VAR Time1_ = HOUR(Table1[Job Booking Date]) VAR Time2_ = HOUR(Table1[Attempted Acceptance Date]) VAR Time3_ = HOUR(Table1[Acceptance Date]) VAR Date1_ = INT(Table1[Job Booking Date]) VAR Date2_ = INT(Table1[Attempted Acceptance Date]) VAR Date3_ = INT(Table1[Acceptance Date]) VAR SameDate_ = (Date1_ = Date2_) && (Date2_ = Date3_) RETURN IF( SameDate_ && Time1_ < 12 && Time2_ < 12 && Time3_ < 12, "Yes", "No")
Please mark the question solved when we get to the solution and consider kudoing if posts are helpful.
Cheers ![]()