Forum Discussion

daniel_007's avatar
daniel_007
New Member
5 months ago
Solved

API load more than one URL and after refresh show empty

Hi there, I have a lot of issues with an API connection.

First, I must connect to the API with an URL type https://api/servicios/v1/publico/nn.json?fecha=02022014&ticket=AAEE, that give me 1000 rows per day.
Then, I must compare all the names with a manual list of names (Excel). If one of the names in the Excel list appears in the API data, mark that row.
If found 10 matches, for example, a new URL must be triggered with each of the 10 codes separately: https://api/servicios/v1/publico/nn.json?code=code1/10&ticket=AAEE.

The first time it's ok. But if I refresh the dashboard again, all the tables appears empty.

The queries I'm using are:

LiciData --> First URL to the API connection. Bring 1.000 rows

ExcelList

SearchCoincidence

PositiveCoincidence

CodestoSearch

Function --> Bring all 10 URL calls to the API

ReportTable

I know that I can't put all the Dashboard in here, but please ask me what do you want to know to clarify the problem and try to get the correct queries.

Thanks

 

  • Hi Anonymous, thank you for your message.

    The issue was not resolved, but I already found the way to fix it.

     

    Thank you again.

    Daniel

6 Replies

  • What is your question?  Which application are you planning to use for communication with that API?

     

    Keep in mind that Power BI is not a source data storage solution.

    • daniel_007's avatar
      daniel_007
      New Member

      Source data storage solution? I never said that.

      And I already made it. I used a function and a query that give me the rows that I need. This part of the code has a problem, when I refresh it again, the table shows empty:

      Detalle =
      if List.Count(Codigos) = 0 then
      DetalleVacio
      else
      let
      // Ejecutar la función para cada código
      Tablas = List.Transform(Codigos, each URLconCodigo(_)),

      // Forzar el código en cada tabla ANTES de combinar
      TablasConCodigo =
      List.Transform(
      List.Positions(Codigos),
      (i) =>
      let
      t = Tablas{i},
      c = Codigos{i},
      tConCodigo = Table.AddColumn(t, "Código Licitación", each c, type text)
      in
      tConCodigo
      ),

      // Combinar todas las tablas
      Combinado = Table.Combine(TablasConCodigo)
      in
      Combinado,

       

      What a shame that my post was not understood.

      Regards,

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi daniel_007,

     

    Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to lbendlin  for prompt and helpful responses.

    Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.

     

    Best regards,
    Prasanna Kumar

     

    • daniel_007's avatar
      daniel_007
      New Member

      Hi Anonymous, thank you for your message.

      The issue was not resolved, but I already found the way to fix it.

       

      Thank you again.

      Daniel

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi daniel_007,

     

    Great to hear that it's working as expected on your end! Could you please share the fix? It would be really helpful for others in the community who might be facing similar issues and can address them quickly. Also, I would suggest accepting your approach as the solution so that it can benefit others as well.

     

    Thanks & Regards,

    Prasanna Kumar