Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi Team,
When I pooled my excel sheet from onedrive files by using loop then I got an error like
[DataSource.Error] Web.Contents failed to get contents from 'https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/_api/web/getfilebyserverrelativ...' (404): Not Found
Please help me out.
Regards,
Arvind
Getting the same error, it's sporadic, the links all work fine.
Url you request is unavailable
Add ManualStatusHandling to Web.Contents function. There should be a description on your error
Like this
Web.Contents(YOUR_URL, [ManualStatusHandling={400..499}])
@arvindyadav,
What specific Power Query code do you use to connect to Excel in Power BI Desktop? Please help to describe more details about your connection process.
Regards,
Lydia
Hi @v-yuezhe-msft,
I am using Onedrive for business for connection and blank query for calling new excel file into it.
The following steps are :-
(i as number) as table =>
let
Source = Excel.Workbook(Web.Contents("https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/Documents/Arvind/excel file name" & Number.ToText(i) & ".xlsx"), null, true),
#"detailed_call_report_13-12-2017_Sheet" = Source{[Item="detailed_call_report_13-12-2017",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(#"detailed_call_report_13-12-2017_Sheet", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"call_start_time", type datetimezone}, {"call_end_time", type datetimezone}, {"call_created_by_employee", type text}, {"call_time_in_secs", Int64.Type}, {"customer_id", Int64.Type}, {"customer_name", type text}})
in
#"Changed Type"
After that you need to get data -> Blank query -> {1..10}
It gives list like,
1
2
3
.
.
10
Convert it to table after that add custom column first table([i])
Close and apply.
In above bold letter indicates that I have edited in advance editor to call multiple excel file into power bi desktop from OneDrive for business.
If you want anymore explanation then fell free to mail me.
Regards,
Arvind
First check if these files are available at urls
Use browser )
I see -
404 NOT FOUND
By the way, your url in first post differ from your last one
Your first url is
But url in M-code is
"https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/Documents/Arvind/excel file name" & Number.ToText(i) & ".xlsx"
Try to change this line
Source = Excel.Workbook(Web.Contents("https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/Documents/Arvind/excel file name" & Number.ToText(i) & ".xlsx"), null, true),
to this one
Source = Excel.Workbook(Web.Contents("https://azureneebal-my.sharepoint.com/personal/powerbi_ms_neebal_com/_api/web/getfilebyserverrelativeurl('/personal/powerbi_ms_neebal_com/Documents/Arvind/Detail%20Call%20Report%20" & Number.ToText(i) & ".xlsx')/$value", [ManualStatusHandling={400..499}]), null, true),
User | Count |
---|---|
84 | |
80 | |
70 | |
47 | |
43 |
User | Count |
---|---|
108 | |
54 | |
50 | |
40 | |
40 |