Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Trying to insert some rows into my records without adding a new source. Mostly got it working but it would be nice if there was a predefined date variable I could use to get the current year, month, month day.
Rigth now I am doing this...
#"Insert Blanks" = Table.InsertRows(#"Renamed Columns", 0,{[Date = "1/1/2022" , Value = 0, Name= "xraphael"]})
I want to do something like this...
#"Insert Blanks" = Table.InsertRows(#"Renamed Columns", 0,{[Date = FORMAT("01/01/" & YEAR(TODAY()), "MM/DD/YYYY"), Value = 0, Name= "xraphael"]})
I dont know the correct syntax
Solved! Go to Solution.
You can use this to insert 01-01-2022
= Table.InsertRows(#"Renamed Columns", 0,{[Date = Date.ToText(Date.StartOfYear(Date.From(DateTime.FixedLocalNow())),"MM/dd/yyyy") , Value = 0, Name= "xraphael"]})
If you want to use the first date of month, then replace Date.StartOfYear with Date.StartOfMonth.
If you want current date, then remove Date.StartOfYear.
Thanks this works for me
You can use this to insert 01-01-2022
= Table.InsertRows(#"Renamed Columns", 0,{[Date = Date.ToText(Date.StartOfYear(Date.From(DateTime.FixedLocalNow())),"MM/dd/yyyy") , Value = 0, Name= "xraphael"]})
If you want to use the first date of month, then replace Date.StartOfYear with Date.StartOfMonth.
If you want current date, then remove Date.StartOfYear.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
6 | |
6 | |
6 | |
5 |
User | Count |
---|---|
9 | |
9 | |
8 | |
6 | |
6 |