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

Getting a single column in a gallery to display total not the individual entries

Hi Power Apps Gurus,

I hope you can help, I am stuck getting single gallery item based from SPL to display the total in the APP.

I have tried many versions advised from others in this community but just not working.

I have the following in the TEXT - 

Sum(Filter('Leave Request','Created By'.Email = User().Email && (Status.Value = "Approved")),TotalDays)

So filter to the created by and when the status = approved and add them.

So this add's but displays the total for each entry - eg entry 1 = 3 and entry 2 = 1 total = 4 for this but I see in the gallery 4  repeated for each entry its added and a scroll bar:-

EmmaWatt_1-1669912457218.pngEmmaWatt_2-1669912510102.png

 

I have tried the Sum(Gallery2.Allitems,TotalDays) doesnt work, as with other suggestion with adding a column in a gallery.

 

SPL = Leave Request

Column = TotalDays

 

Any advice gratefully appreciated.

Emma

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @EmmaWatt ,

That Label is meant to outside the gallery. What are you trying to total in each record for it to be inside ?

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @EmmaWatt ,

You can pre-filter to manage the Delegation issue here

With(
   {
      wLeave:
      Filter(
         'Leave Request',
         'Created By'.Email = User().Email && 
         Status.Value = "Approved"
      )
   },
   Sum(
      wLeave,
      TotalDays
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

EmmaWatt
Frequent Visitor

Hi Warren,  Thanks for the suggestion, unfortunately is produces the same result as my code - it adds the column by user, but repeats the total for each record they have entered:-

EmmaWatt_0-1669968063916.png

My issue is that its not showing just the total - its showing the total for every entry that its totalling.

Any other ideas?

Thanks 

Emma

Hi @EmmaWatt ,

That Label is meant to outside the gallery. What are you trying to total in each record for it to be inside ?

EmmaWatt
Frequent Visitor

Thanks Warren, It's working now it's outside, thanks for the assistance.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,338)