Forum Discussion
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.
| setor | ParteCorpo | direita/Esquerda | dados iniciais | dados finais | |||
| PRODUÇÃO | BRAÇO INFERIOR | DIREITA | 01/10/2022 | 10/10/2022 | |||
| PRODUÇÃO | PULSO | ESQUERDA | 02/10/2022 | 05/10/2022 | |||
| PRODUÇÃO | LOMBAR INFERIOR | 10/10/2022 | 21/10/2022 | ||||
| PRODUÇÃO | OMBRO | DIREITA | 02/10/2022 | 05/10/2022 | |||
| PRODUÇÃO | MÃO | ESQUERDA | 15/10/2022 | 20/10/2022 | |||
| PRODUÇÃO | BRAÇO INFERIOR | DIREITA | 25/10/2022 | 30/10/2022 | |||
| PRODUÇÃO | LOMBAR SUPERIOR | 01/10/2022 | 10/10/2022 |
5 Replies
- AnonymousNot 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 TeamIf 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_lopsFrequent 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.setor ParteCorpo direita/Esquerda data PRODUÇÃO BRAÇO INFERIOR DIREITA 01/10/2022 PRODUÇÃO BRAÇO INFERIOR DIREITA 02/10/2022 PRODUÇÃO BRAÇO INFERIOR DIREITA 03/10/2022 PRODUÇÃO BRAÇO INFERIOR DIREITA 04/10/2022 PRODUÇÃO BRAÇO INFERIOR DIREITA 05/10/2022 PRODUÇÃO BRAÇO INFERIOR DIREITA 06/10/2022 PRODUÇÃO BRAÇO INFERIOR DIREITA 07/10/2022 PRODUÇÃO BRAÇO INFERIOR DIREITA 08/10/2022 PRODUÇÃO BRAÇO INFERIOR DIREITA 09/10/2022 PRODUÇÃO BRAÇO INFERIOR DIREITA 10/10/2022
- wdx223_DanielCommunity 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_lopsFrequent 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
- elder_lopsFrequent Visitor
Daniel
Essa é a saída esperada.
This is the expected output.