Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello community,
I have data where dates stored as number.
202006 <--as 2020/06
So I created new column in PQ to transfor it to real date.
= Table.AddColumn(#"Added Custom", "MonthFrom", each Date.FromText(Number.ToText([Month From]) & "01"))
I added "01" to the end of numbers. But I want to know , how can I add EndOfMonth instead of "01"?
Thank you.
Solved! Go to Solution.
You could use the Date.EndOfMonth() function with what you already have.
= Table.AddColumn(#"Added Custom", "MonthFrom", Date.EndOfMonth(Date.FromText(Number.ToText([Month From]) & "01")))
You could use the Date.EndOfMonth() function with what you already have.
= Table.AddColumn(#"Added Custom", "MonthFrom", Date.EndOfMonth(Date.FromText(Number.ToText([Month From]) & "01")))
There is a Date.EndOfMonth function (it's available from the interface too -> Add Column->Date->Month) and it needs a legitimate date to work on so this would be additional to the step that adds "01" to make a valid date.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 7 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 19 | |
| 14 | |
| 13 | |
| 11 | |
| 9 |