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,
In my model I got column "Date" with two types of dates: "day-month-year" and "month/day/year". What would be the formula to unify the date format?
I know how do do that in SQL (
IF(`date` RLIKE "[0-9]*/[0-9]*/[0-9]*", concat_ws("-", split(`date`, "/")[1], split(`date`, "/")[0] ,split(`date`, "/")[2]), `date`))...any hint how to approach that in P-BI?
Solved! Go to Solution.
You can use the DATE function for that, together with MID.
MyDateColumn = date("2018", "4", "17") this returns a data value.
Fill in the Year, Month and Day by doing a MID function on your string values.
e.g. MyYear = MID("25/04/2018",7,4) this returns 2018.
You can use the DATE function for that, together with MID.
MyDateColumn = date("2018", "4", "17") this returns a data value.
Fill in the Year, Month and Day by doing a MID function on your string values.
e.g. MyYear = MID("25/04/2018",7,4) this returns 2018.
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 |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |