Forum Discussion

elder_lops's avatar
elder_lops
Frequent Visitor
3 years ago

insert the missing dates between the columns in line

Olá sou do Brasil, tenho uma tabela na consulta de alimentação do atestado médico, tenho as seguintes colunas: "Parte do Corpo"; "Dados iniciais"; " "Data Final" na mesma linha, que as datas ficassem em uma coluna repetindo a "Parte do Corpo de informações mas que os dados são apresentados apenas como sugestões" a partir dos dados iniciais até o final.    

 

link de dados 

setorParteCorpodireita/Esquerdadados iniciaisdados finais   
PRODUÇÃOBRAÇO INFERIORDIREITA01/10/202210/10/2022   
PRODUÇÃOPULSOESQUERDA02/10/202205/10/2022   
PRODUÇÃOLOMBAR INFERIOR 10/10/202221/10/2022   
PRODUÇÃOOMBRODIREITA02/10/202205/10/2022   
PRODUÇÃOMÃOESQUERDA15/10/202220/10/2022   
PRODUÇÃOBRAÇO INFERIORDIREITA25/10/202230/10/2022   
PRODUÇÃOLOMBAR SUPERIOR 01/10/202210/10/2022

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi elder_lops ,

     

    Hi, I'm still confused about the above description, would you mind providing the expected output again like in this thread, it would be helpful. Thanks!🙂

    Solved: inserting records for missing months

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data

    • elder_lops's avatar
      elder_lops
      Frequent Visitor
      Good morning! I'm from Brazil
      
      Come on!! I have a table that contains attestation release each row corresponds to an attestation that has start date and end date. I need the dates to be in sequential lines. Example if the certificate starts on the 1st and ends on the 10th, repeat the values ​​in each line with its day, and repeating the certificate data.


      setorParteCorpodireita/Esquerdadata
      PRODUÇÃOBRAÇO INFERIORDIREITA01/10/2022
      PRODUÇÃOBRAÇO INFERIORDIREITA02/10/2022
      PRODUÇÃOBRAÇO INFERIORDIREITA03/10/2022
      PRODUÇÃOBRAÇO INFERIORDIREITA04/10/2022
      PRODUÇÃOBRAÇO INFERIORDIREITA05/10/2022
      PRODUÇÃOBRAÇO INFERIORDIREITA06/10/2022
      PRODUÇÃOBRAÇO INFERIORDIREITA07/10/2022
      PRODUÇÃOBRAÇO INFERIORDIREITA08/10/2022
      PRODUÇÃOBRAÇO INFERIORDIREITA09/10/2022
      PRODUÇÃOBRAÇO INFERIORDIREITA10/10/2022
       

       

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Community Champion

    NewStep=#table({"setor","ParteCorpo","direita/Esquerda","date"},List.TransformMany(Table.ToRows(PreviousStepName),each List.Dates(_{3},Duration.Days(_{4}-_{3})+1,Duration.From(1)),(x,y)=>List.FirstN(x,3)&{y}))

    • elder_lops's avatar
      elder_lops
      Frequent Visitor

      Boa tarde! Daniel

       

      Não consegui gerar a lista conforme o comando que me passou posso enviar o arquivo para você, preciso entender mais de powerquery pela linha de comando enviada eu não consegui identificar e corrigir o erro.

       

      Good evening! Daniel

      I couldn't generate the list according to the command you gave me I can send the file to you, I need to understand more about powerquery by the command line sent I couldn't identify and correct the error

       

      ARQUIVO EXCEL E PBIX CORPO HUMANO 

      • elder_lops's avatar
        elder_lops
        Frequent Visitor

        Daniel

         

        Essa é a saída esperada.

         

        This is the expected output.