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.
Hello,
I have codes such as
202201
202207
which represents year 2022 and respective month where 01 is january, 07 is july etc.
I would like to change them to represent date for the first of that month so
202201 - 01/01/2022
202207 - 01/07/2022
Ideally in power query, may be in dax also
Thank you in advance for your help
Solved! Go to Solution.
Hello, try this (dax)
NewDate = DATE(MID(202207,1,4),MID(202207,5,2),"01")
Hello there @evandrocunico ! If you need it in PQ you can do the following:
= Table.AddColumn(Previous_Step, "Column_Name", each Text.Combine({"01/", Text.Middle([Date_Column], 4), "/", Text.Start([Date_Column], 4)}), type date)
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
Hello there @evandrocunico ! If you need it in PQ you can do the following:
= Table.AddColumn(Previous_Step, "Column_Name", each Text.Combine({"01/", Text.Middle([Date_Column], 4), "/", Text.Start([Date_Column], 4)}), type date)
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
Hello, try this (dax)
NewDate = DATE(MID(202207,1,4),MID(202207,5,2),"01")
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 |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |