Forum Discussion
Thankyouverymuc
4 years agoNew Member
Get Time from DateTime field
Dear Power BI community, Can anyone please help me with a DAX formula with extracting the time value from a datetime field. See for example the below datetime values and I want to extract the t...
tackytechtom
Most Valuable Professional
4 years agoHi Thankyouverymuc ,
Good question and I do not know the exact answer. Maybe it's because the TIME function returns datetime and PBI cannot compare DateTime with Time.
Maybe try this?
Column 2 = IF ( HOUR([NewColumn]) = 3 && MINUTE([NewColumn]) = 0 && SECOND([NewColumn]) = 0, 1, 2)
Please, do not forget to mark the answers as solutions that solve your issue 🙂 Other readers will have it easier to find their way through if they happen to get to this thread here...
Thankyouverymuc
4 years agoNew Member
Thank you tackytechtom , you solved my problem 🙂 The above IF formula works as well.