Forum Discussion
How to Get Month and time from Datetime Field
I think if you use FORMAT() you can build a custom string however you want. Here's the link https://docs.microsoft.com/en-us/dax/custom-date-and-time-formats-for-the-format-function
I'm a personal Power Bi Trainer I learn something every time I answer a question
The Golden Rules for Power BI
- Use a Calendar table. A custom Date tables is preferable to using the automatic date/time handling capabilities of Power BI. https://www.youtube.com/watch?v=FxiAYGbCfAQ
- Build your data model as a Star Schema. Creating a star schema in Power BI is the best practice to improve performance and more importantly, to ensure accurate results! https://www.youtube.com/watch?v=1Kilya6aUQw
- Use a small set up sample data when developing. When building your measures and calculated columns always use a small amount of sample data so that it will be easier to confirm that you are getting the right numbers.
- Store all your intermediate calculations in VARs when you’re writing measures. You can return these intermediate VARs instead of your final result to check on your steps along the way.
kentyler thanks for the Quick reply
i got the result formated as i need but the result is in Text date type and when i change the type to datetime its converting back to the format
can you suggest how to solve this.
dax i used :
- kentyler6 years agoSolution Sage
It is possible some ways of writing a date as text cannot be automatically converted back to being dates, you can refer to the original field to get the value as a date as long as its in the table, it does not have to be on the visual.
- amitchandak6 years agoSuper User
In the data view, There are a few formats you can select.