cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sarfika
Regular Visitor

How to filter gallery from dropdown and sum the grand total

Hai, when the "contract number" selected, the Contract utilization will calculated based on the sum of "total after sst" on grand total column. But the gallery not filter based on the contract number selected. Kindly help me on this. Thankyou

 

You can refer the attachment for more info

Screenshot1.png

1 ACCEPTED SOLUTION

Accepted Solutions
NandiniBhagya20
Solution Sage
Solution Sage

Hi @sarfika ,

In Items property of your gallery you will have to use below formula - 

Filter(Cart, IsBlank(DropdownControlNameWithContractNumber.Selected.Value) || 'Contract Number'=DropdownControlNameWithContractNumber.Selected.Value)

 

 


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

6 REPLIES 6
NandiniBhagya20
Solution Sage
Solution Sage

Hi @sarfika ,

In Items property of your gallery you will have to use below formula - 

Filter(Cart, IsBlank(DropdownControlNameWithContractNumber.Selected.Value) || 'Contract Number'=DropdownControlNameWithContractNumber.Selected.Value)

 

 


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Thank you for the solution, but why sometime the total in Contract utilization appear and sometime not?

Instead of writing the formula in OnChnage event of dropdown, you can directly write the formula in Default property of sum text input control or Text property of Label - 

Sum(Gallery6.AllItems, 'Total After STT')


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

sarfika_0-1668509210739.png

it's my format wrong?

Your format is correct. I guess the problem is in Contract Utilization Value as it is formatted text.

You can try revising your formula to -

Text(Value(ContractAmount.Text)-Sum(Gallery6.AllItems, 'Total After STT'),"RM##,###,###.00")

 


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

ya, this formular is work. thank you so much for your help

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,236)