Forum Discussion
ievazal
2 years agoFrequent Visitor
DateTime comparisons
Hello! I have a table that shows data on when visits are created for different buildings and when the visitor has checked-in. Building Visit created on Check-in time A 1-08-2023 11:0...
christinepayton
Most Valuable Professional
2 years agoSQL BI has a good article on how to add/remove date time in measures here:
https://www.sqlbi.com/blog/alberto/2019/03/25/using-dax-with-datetime-values/
You could use variables to store all the things you're comparing. My roundabout guesstimate to get the 4pm the day before for comparison would be to subtract a day from the given date, convert it to date only, then convert it back to date time and add the hours up to 4pm to it. Then you can compare it to the date field in your data and return a true/false if it's greater than or less than the 4pm prior day.