Forum Discussion
Anonymous
8 years agoNot applicable
Convert Measure Text type into Date-Time Type
I have written 2 measures which gives me date value and time value. SelectedDate = SELECTEDVALUE(New[BEGIN_DATE]) SelectedTime = SELECTEDVALUE(DateRange[TimeRange]) these both data typ...
prateekraina
8 years agoMemorable Member
Hi Anonymous,
Here is the required DAX.
DateTime =
DATEVALUE (
SELECTEDVALUE ( Table[Date] ) & " " & SELECTEDVALUE ( Table[Time] )
)Enjoy !!
Prateek Raina
- Anonymous8 years agoNot applicable
prateekraina thanks for the reply
i tried this but didnt worked.
Selected Date-Time Range = DATEVALUE ( SELECTEDVALUE ( New[BEGIN_DATE] ) & " " & SELECTEDVALUE(DateRange[TimeRange]))Not giving the time value.
- prateekraina8 years agoMemorable Member
Hi Anonymous,
Check out this short video. You can achieve this in the Power Query Editor itself.
No need for DAX measures.
Prateek Raina
- Anonymous8 years agoNot applicable
Well thanks for the suggestion prateekraina.
I know we can achive this by power query and DAX calculated column.
I have done that already.
But for my requirement, i have to go with the measures only.
If you have time then go with the detaield explantion of what im trying to achive
https://community.powerbi.com/t5/Desktop/How-to-create-Dynamic-Date-Time-Range/m-p/482159
Thanks,
Mohan V