Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I have a date that I need to connect with a text piece. Now when I combine my selected date with the text the date comes out in a wrong format (US date format, MM/DD/YYYY, 1/31/2025) allthough all my regional settings are set to german / european:
Dax:
Result:
Originally the date column has this format (german / european) -> DD/MM/YY -> 31.01.2025
Why does the text come out as US date allthough all settings are german / european format and how to change it?
Thanks!
Solved! Go to Solution.
Hi @UIUser ,
The issue occurs because when you concatenate a date with text in DAX, Power BI implicitly converts the date to a string using the default US format (MM/DD/YYYY), ignoring your regional settings. This happens even if your system or file is configured for German formatting. To fix this, you need to explicitly format the date before concatenation. Use the FORMAT function to define the correct European date structure. For example, instead of relying on SELECTEDVALUE to output a date directly, wrap it like this:
header_ertragleer_previous_month =
"Ertrag leer per " & FORMAT(SELECTEDVALUE('bm dim_month'[month_end]), "DD.MM.YYYY")
This ensures the date appears as 31.01.2025 regardless of Power BI’s internal preferences. If you want to reinforce the language tag just in case, use the following format string:
header_ertragleer_previous_month =
"Ertrag leer per " & FORMAT(SELECTEDVALUE('bm dim_month'[month_end]), "[$-de-DE]dd.mm.yyyy")
This forces the German locale format and avoids any surprises when the report is opened elsewhere.
Best regards,
Hi @UIUser
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @UIUser ,
Thanks for reaching out to the Microsoft fabric community forum.
As mentioned by @DataNinja777 , I tried to implement their suggestion and it has successfully worked at my end
Give this a try it will most likely resolve the issue.
Furthe Reading: SELECTEDVALUE function - DAX | Microsoft Learn
FORMAT function (DAX) - DAX | Microsoft Learn
If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thank you
Hi @UIUser ,
The issue occurs because when you concatenate a date with text in DAX, Power BI implicitly converts the date to a string using the default US format (MM/DD/YYYY), ignoring your regional settings. This happens even if your system or file is configured for German formatting. To fix this, you need to explicitly format the date before concatenation. Use the FORMAT function to define the correct European date structure. For example, instead of relying on SELECTEDVALUE to output a date directly, wrap it like this:
header_ertragleer_previous_month =
"Ertrag leer per " & FORMAT(SELECTEDVALUE('bm dim_month'[month_end]), "DD.MM.YYYY")
This ensures the date appears as 31.01.2025 regardless of Power BI’s internal preferences. If you want to reinforce the language tag just in case, use the following format string:
header_ertragleer_previous_month =
"Ertrag leer per " & FORMAT(SELECTEDVALUE('bm dim_month'[month_end]), "[$-de-DE]dd.mm.yyyy")
This forces the German locale format and avoids any surprises when the report is opened elsewhere.
Best regards,
User | Count |
---|---|
84 | |
82 | |
66 | |
52 | |
46 |
User | Count |
---|---|
100 | |
48 | |
42 | |
39 | |
38 |