cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LucieRipova
Frequent Visitor

counting data from multiple galleries

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

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

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.

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

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.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,971)