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,
Thanks for reading in advance.
I am able to connect to the REST API but I am unable to select pages other than the current page. I am using a get pages function to list total number of pages but this just pulls the current page and mutliplies it by the total number of pages. This is the API I am using and this is how the pagination works but I do not know how to apply it in Power BI. Logiforms API Version 1.0 Documentation
Here's screen shots of the API query steps and the codes are below.
1.
2.
3.
4.
5.
6.
This is the code I am using for the API. I've omitted some sensitive information:
Source = Json.Document(Web.Contents("https://forms.logiforms.com/api/1.0/form/xxxxx/data/")),
data = Source[data],
List={1..data[total_pages]},
#"Converted to Table" = Table.FromList(List, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type text}}),
#"Invoked Custom Function" = Table.AddColumn(#"Changed Type", "getPage", each getPages([Column1])),
#"Expanded getPage" = Table.ExpandTableColumn(#"Invoked Custom Function", "getPage", {"Col 2", "Col3", "Col 4", "Col 5"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Expanded getPage",{{"Line Manager Email", type text}, {"Line Manager", type text}, {"Programme / Dept", type text}, {"Quarterly score", type text}, {"CoMember Email", type text}, {"lfuuid", type text}, {"Job Title", type text}, {"Belinda email", type text}, {"Region", type text}, {"PAR Upload", type text}, {"CoMember Name", type text}, {"Senor Managers Email", type text}, {"Payroll Number", type text}, {"Senior Manager", type text}, {"datesubmitted", type datetime}, {"RecordID", type date}})
in
#"Expanded getPage"
This is the getPage function I am using to list all the pages:
(page as text) =>
let
Source = Json.Document(Web.Contents("https://forms.logiforms.com/api/1.0/form/xxxxx/data/")),
data = Source[data],
records = data[records],
#"Converted to Table" = Table.FromList(records, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"Col 1", "Col 2", "Col 3", "Col 4", "Col 5"}, {"Col 1", "Col 2", "Col 3", "Col 4", "Col 5"})
in
#"Expanded Column1"
Hi, @Anonymous
Glad to hear that you have solved your problem by yourself, would you like to share some experience or just mark your own reply as a solution so that others can learn from it too?
Thanks in advance!
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I figured it out
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |