Monday x Power BI integration with loop for number of pages

Hey guys.

I used the link below to update my Monday.com integration query with Power BI due to the API update in 10-2023.

It’s working perfectly, but it’s limiting the number of pages that are returned in my dataset. This is a problem for me, as I have tables with many lines and I would like the information to appear automatically (as in the previous query).

I’m having a problem, because I’m not able to put a loop in M ​​language so that it can be integrated into Power BI automatically.

Can someone help me?

Hello there @arianetiffani and welcome to the community!

I do not have experience with Power BI but maybe @hbouk might be able to help since it looks like he has lots of experience with it.

Cheers,
Matias

@arianetiffani you can modify the GetBoard_1stPage and GetBoard_RemainingPages functions so that the limit is 500 instead of 100. You can also follow the example provided in the Monday board query file to add additional pages to the table.

/* If you need to load more than 500 rows of data then duplicate the three lines above and modify the variable names. You will also need to add the new variable in the Table.Combine function below /
/
E.G.

      #"6th_Page_Table" = if #"6th_page_cursor" <> "NoMorePages" then GetBoard_RemainingPages(#"6th_page_cursor") else EmptyTable(),
		#"6th_Page_Table_Updated" = Table.ReplaceValue(#"6th_Page_Table",null,"NoMorePages",Replacer.ReplaceValue,{"Column1.cursor"}),
		#"7th_page_cursor" = #"6th_Page_Table_Updated"{0}[Column1.cursor],
  */

and then update the line that merges all of the tables together.

Combined_Table1 = Table.Combine({#“1st_Page_Table_Updated”, #“2nd_Page_Table_Updated”, #“3rd_Page_Table_Updated”, #“4th_Page_Table_Updated”, #“5th_Page_Table_Updated”}), // add additional table variables if more than 500 rows of data

One person has given me some sample code to implement a loop but it didn’t work so I am debugging it. Someone else has requested the loop be dynamic so that they don’t have to make adjustments to the query. All reasonable requests but it will take some time.

1 Like