Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Query
Unanswered

Join 3 tables with relation A 1:N to B and A 1:N to C

(1) ShareShare
ReportReport
Posted on by
Existem várias Transportadoras que cada uma delas possue vários camiões e vários atrelados portanto eu quero uma tabela com todos camiões e atrelados de cada uma das empresas. até já tentei o seguinte mas dá sempre erro
ClearCollect(
    TabelaUnificada,
    ForAll(
        Transportadora,
        With(
            {
                IDTransportadora: ID,
                NomeAbreviado: Abreviatura
            },
            ForAll(
                Filter(Camiao, swell_Transportadora = IDTransportadora),
                ForAll(
                    Filter(Atrelado1, swell_EmpresaAtre = IDTransportadora),
                    {
                        Transportadora: NomeAbreviado,
                        Camiao: Matricula,
                        Atrelado: MatriculaAtre
                    }
                )
            )
        )
    )
)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ClearCollect(
    TabelaUnificada,
    ForAll(
        Transportadora,
        ForAll(
            Filter(Camiao, swell_Transportadora = Transportadora[@ID]),
            ForAll(
                Filter(Atrelado1, swell_EmpresaAtre = Transportadora[@ID]),
                {
                    Transportadora: Transportadora[@Abreviatura],
                    Camiao: Matricula,
                    Atrelado: MatriculaAtre
                }
            )
        )
    )
)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dá sempre o seguinte erro:
Número inválido de argumentos: 1 recebidos, 2 ou mais esperados. Carateres inesperados. A fórmula contém "Error" onde é esperado "ParenClose". Carateres inesperados. Os caracteres são utilizados na fórmula de forma inesperada.
Categories:
  • ronaldwalcott Profile Picture
    3,815 on at
    Join 3 tables with relation A 1:N to B and A 1:N to C
    Try changing to use ThisRecord and indicate where the error is occurring by showing screenshot with the error. You can also provide the data structure of the tables and the link between them
     
    ClearCollect(
        TabelaUnificada,
        ForAll(
            Transportadora,
            With(
                {
                    IDTransportadora: ThisRecord.ID,
                    NomeAbreviado: ThisRecord.Abreviatura
                },
                ForAll(
                    Filter(Camiao, swell_Transportadora = IDTransportadora),
                    ForAll(
                        Filter(Atrelado1, swell_EmpresaAtre = IDTransportadora),
                        {
                            Transportadora: NomeAbreviado,
                            Camiao: Matricula,
                            Atrelado: MatriculaAtre
                        }
                    )
                )
            )
        )
    )

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics