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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / counting data from mul...
Power Apps
Answered

counting data from multiple galleries

(0) ShareShare
ReportReport
Posted on by 8

Hello,

 

I have galeries A, B, C, D, E. Data are from Excel tables. I need to count items in galleries, but i need to cout first item of A gallery+ first item of B gallery + first item of C gallery + first item of D gallery. And this for another "rows". 

I tried:

Sum(EkoKonfigTextInput;EkoAnalyzaTextInput;EkoMigraceTextInput;EkoPravaTextInput)

 But it count everything, and are there the same value for every "rows". In picture you can see galleries, what it do and what I need.

tablesodhad.jpg

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @LucieRipova ,

     

    I did a simple test for you.

    1\ This is my table 'Table1' in excel.

    v-xiaochen-msft_0-1618542845946.png

     

    2\ Add 4 gallery control 'Gallery1', 'Gallery1_1', 'Gallery1_2' and 'Gallery1_3'.

    Set their Items property to:

    'Gallery1' Items:

    Table1.Test1

    'Gallery1_1' Items:

    Table1.Test2

    'Gallery1_2' Items:

    Table1.Test3

    'Gallery1_3' Items:

    Table1.Test4

     

    Insert 4 Textinput control into the 4 gallery control 'TextInput1' ,'TextInput1_1' , 'TextInput1_2' and 'TextInput1_3'.

    Set theri Default property to:

    ThisItem.Test1
    ThisItem.Test2
    ThisItem.Test3
    ThisItem.Test4

     

    3\ Add the 5th gallery control 'Gallery1_4' and set its Items property to:

    Sequence(CountRows(Gallery1.AllItems))

     

    Insert a label control and set its Text property to:

    Sum(Last(FirstN(Gallery1.AllItems,ThisItem.Value)).TextInput1.Text,Last(FirstN(Gallery1_1.AllItems,ThisItem.Value)).TextInput1_1.Text,Last(FirstN(Gallery1_2.AllItems,ThisItem.Value)).TextInput1_2.Text,Last(FirstN(Gallery1_3.AllItems,ThisItem.Value)).TextInput1_3.Text)

     

    4\ The result is as follows:

    AAA.gif

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard