This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
in the excel file that I import into power bi there is a date field in the month-year format
example
12019 (january 2019)
122019 (December 2019)
42020 (April 2020)
I have to transform this field into this format: day / month / year
Now I proceed like this
I take the last 4 digits and transform them into the year column
the other two digits proceed like this
if it is equal to 1, then it becomes 1/1 / and I add the year
if it equals 2, then it becomes 1/2 / + year
and so on.
Is there a faster and more effective way?
thank you.
Solved! Go to Solution.
@AleFVG , You can create a date like this
date = date(right([col],4) , left([col], len([col])-4),1)
now you can convert to format from Column tools or format commnad
Text date = format([date], "DD/MM/YYYY")
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
@AleFVG , You can create a date like this
date = date(right([col],4) , left([col], len([col])-4),1)
now you can convert to format from Column tools or format commnad
Text date = format([date], "DD/MM/YYYY")
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
thanks for the support @amitchandak !
I created a new column, and entered the formula you suggested.
Error displayed below:
Expression.Error: The name "date" was not recognized, please check orthography.
When I enter the formula, it confirms that there are no syntax errors.
Sorry @amitchandak !
Your solution works!
I was trying to insert the formula into the data model, and it doesn't work!
I tried to insert it in the table and it works!
many thanks.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 33 | |
| 26 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 43 | |
| 28 | |
| 24 | |
| 22 |