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.
Hi,
I am searching for a simple solution to loop throu a website-content API to get all Records...
Fond a simple way by the use of a function:
(Skip_It as number) as table =>
let
Quelle1 = Web.Contents("https://URL-DELETED?skip=" & Number.ToText(Skip_It)),
Quelle = Json.Document(Quelle1),
data = Quelle[data],
#"In Tabelle konvertiert" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Erweiterte Column1" = Table.ExpandRecordColumn(#"In Tabelle konvertiert", "Column1", {"_id", "_type", "city", "email", "geoLat", "geoLng", "isXSLocation", "mainCategoryUid", "name", "phone", "postalCode", "street", "uid", "website"}, {"Column1._id", "Column1._type", "Column1.city", "Column1.email", "Column1.geoLat", "Column1.geoLng", "Column1.isXSLocation", "Column1.mainCategoryUid", "Column1.name", "Column1.phone", "Column1.postalCode", "Column1.street", "Column1.uid", "Column1.website"})
in
#"Erweiterte Column1"
This funtion works well with a table by skipping record-numbers für the API Call
BUT: when i want do close/save the PowerQuery Editor i get an strange error:
"Der Ausdruck in der Partition "n/a" in Tabelle "n/a" verweist auf eine unbekannte Entität."
meaning there is a partition in an unknown table for an unknown entity???
What did i do wrong in den funtion? Did not found anything wrong here, no syntax error....???
Thanks for a hint!
Josef
Solved! Go to Solution.
Hi, @ImkeF - thanks for the link!
TURNING the "enhanced metadata format" OFF and restart PowerBI WITH an NEW file (ans copyying evry formular via windows editor solved this problem!
Thanks Josef
Hi @jofujofu
that looks really strange. Hard to see that the function is actually the reason for it.
Could it be a problem in the query instead that you're calling the function from?
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi Imke,
the query deliveres the rights results. Also the function workes fine, when Triggered manually (step by step codeing in the enhenced editor in PowerBI... After Saveing I always receives this Error (didnt found the english equivalent!):
Zurückgegebener Fehler: "Der Ausdruck in der Partition "n/a" in Tabelle "n/a" verweist auf eine unbekannte Entität. ".
Must have to do with the transformation from the API Call (Website-API / no uid/pw) to the JSON and furthermore to the Table. It's a simple Web Call....
???
Any hints?
Josef
Hi @jofujofu
do you have the "Store datasets in enhanced metadata format" turned on?
I've had the same error when copy pasting a working set of queries into a new file with the preview feature "Store datasets in enhanced metadata format" turned on. It seems to be a bug that others are experiencing as well, unfortunately:
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi, @ImkeF - thanks for the link!
TURNING the "enhanced metadata format" OFF and restart PowerBI WITH an NEW file (ans copyying evry formular via windows editor solved this problem!
Thanks Josef
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 |
---|---|
102 | |
53 | |
21 | |
13 | |
11 |