The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello friends,
I have a column looks like this
02/07/2020 |
05/06/2019 |
13/12/2015 |
30/01/2017 |
I want to convert to
01/07/2020 |
01/06/2019 |
01/12/2015 |
01/01/2017 |
I am currently using an ugly way of achieve
1. Convert date to text,
2. Trim the first two digit,
3. Concat with "01"
4. Convert it back to date.
Just want to know is there an elegant way?
Solved! Go to Solution.
@Anonymous There is also a button for this in the Add Column tab in Power Query:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi,
This calculated formula in DAX will also work
=EOMONTH(Data[Date],-1)+1
@Anonymous There is also a button for this in the Add Column tab in Power Query:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com