Forum Discussion
CongPham
Helper I
6 years agoConvert a text measure to a date time measure
Hi all, I have a problem with my calendar table. I create a max_date measure, and POWER BI undrestand it is a datetime value. Same when I create a same_max_date_last_week = max_date - 7, and PO...
- 6 years agotry likeCALCULATE( MAXx( ALLSELECTED( 'calendar'[Date] ), DATEADD('calendar'[Date_with_end_time_of_day],-1,MONTH) ) )
CongPham
Helper I
6 years agoHi amitchandak
The max_date_same_last_week is OK, it known as a datetime value and I can format it at Modeling tab
But the problem is the max_date_same_last_month, when I use EDATE and add TIME(23,59,59) into the measure, the system cannot undrestand it is a datetime value.
amitchandak
Super User
6 years agotry like
CALCULATE( MAXx( ALLSELECTED( 'calendar'[Date] ), DATEADD('calendar'[Date_with_end_time_of_day],-1,MONTH) ) )