Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello All,
We have a small excel that contains two columns. Emp Name & Compliane %.
Employee | Compliance % |
Steve | 80% |
Mathew | 75% |
John | 65% |
While loading this excel into Power BI, we need to add timestamp as MMM-YYYY (Current Month-Year). We tried but getting multiple issues. Below is the code we use in Advance Editor:
let
Source = Excel.Workbook(Web.Contents("https://mysharepoint.com/personal/prus_com/Documents/Employee.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Employee", type text}, {"Compliance %", type number}})
in
#"Changed Type"
How to add timestamp while loading data into all the rows with Excel data.
Thanks,
PBI V2
Solved! Go to Solution.
Hi @Anonymous ,
You can add a custom column in Power Query Editor to get it, please update the applied codes of your Advanced Editor as below:
let
Source = Excel.Workbook(Web.Contents("https://mysharepoint.com/personal/prus_com/Documents/Employee.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Employee", type text}, {"Compliance %", type number}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "timestamp", each DateTime.ToText(DateTime.LocalNow(),"MMM-yyyy"))
in
#"Added Custom"
Best Regards
Hi @Anonymous ,
You can add a custom column in Power Query Editor to get it, please update the applied codes of your Advanced Editor as below:
let
Source = Excel.Workbook(Web.Contents("https://mysharepoint.com/personal/prus_com/Documents/Employee.xlsx"), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Employee", type text}, {"Compliance %", type number}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "timestamp", each DateTime.ToText(DateTime.LocalNow(),"MMM-yyyy"))
in
#"Added Custom"
Best Regards
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |