Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I want change format for date with DAX expression while direct query in Power BI. I have tried with format function in DAX but getting error like "Function 'FORMAT' is not allowed as part of calculated column DAX expressions on DirectQuery models."
Thank you.
Try change the regional settings of Power BI, and then re-format your date. This allows you to change the format from dd/mm/yyyy to mm/dd/yyyy. Remember this is global setting, all your date will be changed based on your selection
Hi Jessica,
Thanks for your reply. We have tried as you given information , we got many formats. But we need "dd-MMM-yyyy hh:mm:ss"
(22-Mar-2018 02:07:43) format. that is not available in that formats. This format we can achive by using DAX only or any other options is there? If any options avaliable pls let us know.
Thank you.
Hi @NLeelakrishna,
You can try just extracting each individual part and casting it to a date. So if you want a MM/DD/YYYY format, try:
= MONTH(Date[date])&"/"&DAY(Date[date])&"/"&YEAR(Date[date])
Hope that helps!
Hi Joho,
Thank you for the idea, we will try and let you know.
Without DAX is that possible in the data modeling, Like custome format like (dd/MMM/yyyy).
As far as I know it get taken from your local DateTime settings and there's no way to override it without DAX
Thank you Joho for your confirmation.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |