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

estimate the total of some values when checkboxes are activated

Hello together,

 

I have a problem with estimating the total of some values, when a checkbox is activated. There's the following problem: I'd like to display the total of some values into a textbox. The values should be assigned to different checkboxes. When a checkbox is activated, the assigned value should be added to the total. At the moment, my app looks like this (the checkboxes "Workshops" and "Schulungen" are only there to set the other checkboxes onVisible):

 

checkboxes.PNG

 

 I've already tried it with context variables, but this didn't turned out well. Is there a way to solve this problem? If you have a solution which doensn't add up to my initial position, please still let me know.

 

Thanks,

Maurice

1 REPLY 1
v-micsh-msft
Community Support
Community Support

Hi @Maurice,

 

Would you please share more information about the Data you would like to sum (Or add together) with, and how the checkbox works by filtering the data?

Toggle control could only return true or false value.

For example, if we would like to reference the value of the toggle control, we use:

Toggle1.value

Ans this only contains two value: True or false.

So assume we have a data dable, and would like to filter the table based on the toggle control value, we could write the formula as below:

If(toggle1.value = true, sum(filter(Table, Column=SomeValue), NumericalFormula(or field)))

Function reference:

Average,Max, Min, StdevP, Sum, and VarP functions in PowerApps

Toggle control in PowerApps

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (4,382)