Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello dear community,
I have the following problem and also query.
How can I validate the data before extracting the data, check the file(source) contains information. To avoid errors(attached image).
For example: validate if report.html has data. If NO data, create a table with two columns, one row with zero values.
(I know that the error is due to not finding the "Computer" column and it will never exist when there is no data in the html file).
let
Origen = Web.Contents("https://site.com/report.html"),
#"Tabla extraída a partir de HTML" = Html.Table(Origen, {{"Column1", "TABLE:nth-child(91) > * > TR > :nth-child(1)"}, {"Column2", "TABLE:nth-child(91) > * > TR > :nth-child(2)"}, {"Column3", "TABLE:nth-child(91) > * > TR > :nth-child(3)"}, {"Column4", "TABLE:nth-child(91) > * > TR > :nth-child(4)"}}, [RowSelector="TABLE:nth-child(91) > * > TR"]),
#"Encabezados promovidos" = Table.PromoteHeaders(#"Tabla extraída a partir de HTML", [PromoteAllScalars=true]),
#"Tipo cambiado" = Table.TransformColumnTypes(#"Encabezados promovidos",{{"Computer", type text}, {"Number", Int64.Type}, {"%", Int64.Type}, {"", type text}}),
#"Columnas quitadas" = Table.RemoveColumns(#"Tipo cambiado",{""}),
#"Tipo cambiado1" = Table.TransformColumnTypes(#"Columnas quitadas",{{"Number", Int64.Type}})
in
#"Tipo cambiado1"
Appreciated Any guidance
Solved! Go to Solution.
MissingField.Ignore might be able to help with that. It will bypass the error instead of stopping on it. Here is a video showcasing the feature.
https://www.youtube.com/watch?v=D59nkSr_JqQ&ab_channel=Goodly
MissingField.Ignore might be able to help with that. It will bypass the error instead of stopping on it. Here is a video showcasing the feature.
https://www.youtube.com/watch?v=D59nkSr_JqQ&ab_channel=Goodly
Hi jdbuchanan71
Thanks for the link. It will help me to orient myself.
Best regards
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
101 | |
75 | |
65 | |
63 |
User | Count |
---|---|
142 | |
105 | |
102 | |
81 | |
68 |