Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi Team,
Please can you help me to convert below date field into Date Time format in DAX to use in Tabular model.
Input:
Expected Output format:
Hi @Pawan
Maybe you can transfer data in power query, and change it as datetime type
e.g:
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous I am working on Tabular cube and loading into Power BI. I can apply onl dax Convertion in Tabular cube.
Hi @Pawan
You can try this code:
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous I am getting this error Can't convert value of type text to Datetime
It should be 19
@Anonymous
Could be. I thought the space counts. Probably not?
Hi @tamerj1 I am getting error like Can't convert value of type text to Datetime
Seems it is not recognizing the YYYY-MM-DD format. In this case am afraid that it has to be done manually by extracting the year, the month, the day using LEFT and MID functions wrapped by VALUE then using the DATE function to calculate the date out of them.
on the other hand you can use MID to extract the time wraped with CONVERT - TIME
Then add the time to date like _date + _time
If you do not need all datetime precision anywhere in the model, I suggest to format it in the source.
I don't have database accesss. i am looking for solution in DAX.
What about PowerQuery?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 14 | |
| 10 | |
| 5 | |
| 5 |