Internal Server Error PowerBI query order_by filter

I tried in different ways to handle the filter to get the answers in descending order or the last ones added, but I keep getting some error, does anyone know what is the syntax for the order_by filter in POWER BI. i tried “” “” , , ‘’ “, / " /”

requestBody = “{”“query”“: ““query { boards (ids:4653026325) { groups { items_page(limit: 100, query_params: {order_by: [{column_id: ““creation_log””, direction: desc}] }){ items { created_at name column_values {column{title}text } }} }}}””}”
I get this error : DataSource.Error: Web.Contents no pudo obtener el contenido de ‘https://api.monday.com/v2’ (500): Internal Server Error.
Detalles:
DataSourceKind=Web
DataSourcePath=https://api.monday.com/v2
Url=https://api.monday.com/v2

Hello, @edgardo16

To sort data in Power BI using the ORDERBY function, follow this syntax:

ORDERBY(table, columnName1, sortOrder1, [columnName2, sortOrder2], ...)

Here’s how to apply it to your scenario:

  1. Replace table with the appropriate table or dataset.
  2. Specify the column name (e.g., creation_log) you want to sort by.
  3. Choose the sorting order: asc (ascending) or desc (descending).

For example, if you’re querying a Monday.com board, adjust your query as follows:

requestBody = "{
  ""query"": ""query {
    boards(ids: 4653026325) {
      groups {
        items_page(limit: 100, query_params: {
          order_by: [{
            column_id: ""creation_log"",
            direction: desc
          }]
        }) {
          items {
            created_at
            name
            column_values {
              column {
                title
              }
              text
            }
          }
        }
      }
    }
  }""
}"

Regarding the error you’re encountering (DataSource.Error: Web.Contents), it seems to be related to fetching data from https://api.monday.com/v2. Check the URL, authentication, and any potential server issues. If the issue persists, consider debugging the connection or checking for updates on the Monday.com API.
SpotifyPie Chart
Hope this will help you.
Best Regard,
geraldine198