cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Sum functions for filtering

Hello,
I wanted to know, I have a table in Excel,budg.JPG in which there are Company and Currency columns, and there are drop-down menus with similar tabsbudg2.JPG, is it possible to configure a text label so that it displays sum for the selected company and currency?
Thanks in advance,
And best wishes.

1 ACCEPTED SOLUTION

Accepted Solutions
chrisog
Responsive Resident
Responsive Resident

Hi @Anonymous,

 

This should be simple enough. You will need to utilise a Switch formula to determine which currency column to return but it is simple enough.

 

Set the Text property of the label to:

 

Sum(Filter(ASK; Company = DropdownCompany.Selected.Company);Switch(DropdownCurrency.SelectedText, "USD", USD, "UAH", UAH, "EUR",EUR))

 

The way this works is that you provide the Sum function of your data source and then provide an expression - basically which column you want to evaluate - using the Switch function. The Switch functions works like a nested If but is easier to use with branching results like yours. It also lets you refer directly to column names. 

View solution in original post

2 REPLIES 2
chrisog
Responsive Resident
Responsive Resident

Hi @Anonymous,

 

This should be simple enough. You will need to utilise a Switch formula to determine which currency column to return but it is simple enough.

 

Set the Text property of the label to:

 

Sum(Filter(ASK; Company = DropdownCompany.Selected.Company);Switch(DropdownCurrency.SelectedText, "USD", USD, "UAH", UAH, "EUR",EUR))

 

The way this works is that you provide the Sum function of your data source and then provide an expression - basically which column you want to evaluate - using the Switch function. The Switch functions works like a nested If but is easier to use with branching results like yours. It also lets you refer directly to column names. 

Anonymous
Not applicable

Thank you very 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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (2,554)