Forum Discussion
Power BI Desktop Table is empty
HI Shijin,
I'm sorry, it seems like I haven't correctly shared the latest version codes. It seems like the code include the old version custom function usages and it conflicts with the new version to cause the issues.(old version function parameterized the URL that used to getting data)
Please take a look at the following codes to confirm if it works on your side:
let
LoopGetData = (initCount as number) as table =>
let
URL = "https://www.xxxxxxxx.com/us/en/store-finder/find?query=45505",
Source = Web.Contents(URL),
extracted = Html.Table(
Source,
{{"Column1", ".name-address.col-3 > .name"}, {"Column2", ".name-address.col-3 > .address"}},
[
RowSelector = ".name-address.col-3 > .name"
]
),
#"Changed Type" = Table.TransformColumnTypes(extracted, {{"Column1", type text}, {"Column2", type text}}),
filtered = Table.FirstN(#"Changed Type", 1),
output =
if initCount > 0 then
if Table.RowCount(filtered) > 0 then
filtered
else
@LoopGetData(initCount - 1)
else
filtered
in
output,
Result = LoopGetData(5)
in
Result
Regards,
Xiaoxin Sheng
Hi @Xiaoxin Shen,
Thank you for this code correction. Now i dont find any error and the code is executed well.
But iam still finding the issue with the blank cells. After mutiple refresh i am able to get the complete data. On the first refresh, iam still finding the null or blank values.
I have attached below the sample result.
Please have a look and advice me on this.
Thanks for your support!
Thanks,
Shijin