The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
The column I have problems with is created by:
DateTimeCMG = FORMAT('CMg 220kV'[Date] + 'CMg 220kV'[HourTime];"dd/mm/yyyy HH:mm")
Being Date, HourTime and DateTimeCMG columns the followings:
Data type: Date - Format: dd/MM/yyyy
Data type: Date/Time - Format: HH:mm
Data Type: Text - Format: Text
As you can see, it is everyhing OK if DateTimeCMG column is kept as Text. However, if I change its data type to Date/Time results in this format:
While 'Date' and 'HourTime' columns remains the same for these first 5 rows!. What am I missing?
Thanks!
Solved! Go to Solution.
Thanks for your answer!. However, I solved this by changing date format into "General Date" instead of "dd/mm/yyyy HH:mm"
DateTimeCMG = FORMAT('CMg 220kV'[Date] + 'CMg 220kV'[HourTime];"General Date")
The issue you are facing is related to the DateTime localisation thats occuring. This could be related to the timezone selected for the PC you are using. For example if you are using a VM on Azure, it might be set to the US format.
Alternatively there is a 'Locale for Import' in the settings under 'File' -> 'Options and Settings' -> 'Options' -> 'Regional Settings'. This could be set to "English (United States)". You might need to set this to something else such as "English (Australia)"
Thanks for your answer!. However, I solved this by changing date format into "General Date" instead of "dd/mm/yyyy HH:mm"
DateTimeCMG = FORMAT('CMg 220kV'[Date] + 'CMg 220kV'[HourTime];"General Date")
Great, glad you solved it! Just be aware that the FORMAT function will return a datatype of String (Text). This can be perfectly fine if you convert it later on in your process back into a Date Type, or are only using the Date in a report display. While it is in text format, date time intelligence cannot be applied to the column.
User | Count |
---|---|
78 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
52 | |
50 | |
46 |