web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : j4VvCKCAaFMMIqbAoon04n
Power Apps - Building Power Apps
Answered

formula doubt

Like (0) ShareShare
ReportReport
Posted on 27 Jul 2020 12:42:32 by 308

Hi

 

I have this formula to sum several itens in sharepoint list. But Look Up sum only the first register. I need to sum all registers with same Cod_UA (there are more than one). I need to use FIlter? How to do it with all this columns?

 

LookUp(INTEGRANTES;Cod_UA=ThisItem.Cod_UA;Sum(OFICIAL_DE_PROMOTORIA_CHEFE;OFICIAL_DE_PROMOTORIA_I;AUXILIAR_DE_PROMOTORIA_CHEFE;AUXILIAR_DE_PROMOTORIA_ENCARREGADO;AUXILIAR_DE_PROMOTORIA_I;AUXILIAR_DE_PROMOTORIA_II;AUXILIAR_DE_PROMOTORIA_III;ANALISTA_DE_PROMOTORIA_I;ANALISTA_DE_PROMOTORIA_II;ANALISTA_JURIDICO_DO_MP;ANALISTA_TECNICO_CIENTIFICO_DO_MP;'ANALISTA_DE_PROMOTORIA_I_(SAUDE)';DIRETOR_DE_AREA_DO_MP;DIRETOR_DE_DEPARTAMENTO_DO_MP;ASSESSOR_DE_DIRECAO_DO_MP;ASSESSOR_DE_GABINETE_DO_MP;ASSESSOR_DO_MP;ASSESSOR_ESPECIAL_DO_MP;ESTAGIARIOS_DE_GRADUACAO;ESTAGIARIOS_DE_NIVEL_MÉDIO;PROCURADOR_DE_JUSTICA;PROCURADOR_GERAL_DE_JUSTICA;PROMOTOR_DE_JUSTICA;PROMOTOR_DE_JUSTICA_SUBSTITUTO;SECRETARIO_DO_MP))
 
Thanks for help
Categories:
  • alessandramaced Profile Picture
    308 on 28 Jul 2020 at 20:51:16
    Re: formula doubt

    Perfect

     

    Thank you very much

  • Verified answer
    v-xida-msft Profile Picture
    on 28 Jul 2020 at 07:53:10
    Re: formula doubt

    Do you want to calculate the total value for all registers against on the OFICIAL_DE_PROMOTORIA_CHEFE, OFICIAL_DE_PROMOTORIA_I, ... columns?

     

    Based on the needs that you mentioned, I agree with you, the LookUp function could not achieve your needs. I have made a test on my side, please try the following formula:

    Sum(
     Filter(
     INTEGRANTES;
     Cod_UA = ThisItem.Cod_UA
     );
     OFICIAL_DE_PROMOTORIA_CHEFE + OFICIAL_DE_PROMOTORIA_I + AUXILIAR_DE_PROMOTORIA_CHEFE + AUXILIAR_DE_PROMOTORIA_ENCARREGADO + AUXILIAR_DE_PROMOTORIA_I + AUXILIAR_DE_PROMOTORIA_II + AUXILIAR_DE_PROMOTORIA_III + ANALISTA_DE_PROMOTORIA_I + ANALISTA_DE_PROMOTORIA_II + ANALISTA_JURIDICO_DO_MP + ANALISTA_TECNICO_CIENTIFICO_DO_MP + 'ANALISTA_DE_PROMOTORIA_I_(SAUDE)' + DIRETOR_DE_AREA_DO_MP + DIRETOR_DE_DEPARTAMENTO_DO_MP + ASSESSOR_DE_DIRECAO_DO_MP + ASSESSOR_DE_GABINETE_DO_MP + ASSESSOR_DO_MP + ASSESSOR_ESPECIAL_DO_MP + ESTAGIARIOS_DE_GRADUACAO + ESTAGIARIOS_DE_NIVEL_MÉDIO + PROCURADOR_DE_JUSTICA + PROCURADOR_GERAL_DE_JUSTICA + PROMOTOR_DE_JUSTICA + PROMOTOR_DE_JUSTICA_SUBSTITUTO + SECRETARIO_DO_MP
    )

     

    If you just want to sum one Number column of all matching records with same Cod_UA value in your SP List, please consider try the following formula:

    Sum(
     Filter(
     INTEGRANTES;
     Cod_UA = ThisItem.Cod_UA
     );
     NumberColumn
    )

     

    Please try above solution, check if the issue is solved.

     

    Regards,

  • PowerAddict Profile Picture
    7,314 Most Valuable Professional on 27 Jul 2020 at 17:05:10
    Re: formula doubt

    Which column do you want to add? Here is a general example: 

     

    Sum(Filter(DataSource, Condition), Column1)

     

    Let me know if this helps. 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • alessandramaced Profile Picture
    308 on 27 Jul 2020 at 14:35:20
    Re: formula doubt

    I change my data. You said to use Look Up, it will return only 1 data correct? 

     

    I need to sum all datas with same ID.

    I can use Look Up for this too?

  • Joel CustomerEffective Profile Picture
    3,224 on 27 Jul 2020 at 14:12:40
    Re: formula doubt

    You posted the same question last week, and I answered it here. https://powerusers.microsoft.com/t5/Building-Power-Apps/Doubt-with-formula/m-p/633741

     

    did my solution not work? Please don't double post the same questions.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2