cancel
Showing results for
Did you mean:
Helper I

## checkbox

how do i have a lable show the total number of checkboxs ticked

so if 3 out of 5 checkbox values are true the lable equals 3

if 5 checkbox values are true then the label equals 5

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Champion

@bongobus1

The state of true resolves to a value of 1. If you were to sum up Checkbox1.Value, Checkbox2.Value, and Checkbox3.Value, where #1, and #2, are true, then you would get an answer of 2.

So you can use:

`Sum(Checkbox1.Value, Checkbox2.Value, Checkbox3.Value)`

Let me know if that works for you.

Microsoft Employee
@8bitclassroom
Helper I

@KroonOfficeSol wrote:
Read all my posts and think for yourself, you will manage then to find your solution.

Hint: you replace value

sorry dont get it - replace value with what ?

14 REPLIES 14
Community Champion

@bongobus1

The state of true resolves to a value of 1. If you were to sum up Checkbox1.Value, Checkbox2.Value, and Checkbox3.Value, where #1, and #2, are true, then you would get an answer of 2.

So you can use:

`Sum(Checkbox1.Value, Checkbox2.Value, Checkbox3.Value)`

Let me know if that works for you.

Microsoft Employee
@8bitclassroom
Helper I

perfect - now how do i make the background of the label go red when 9 is met ?

Helper I

@bongobus1 wrote:

perfect - now how do i make the background of the label go red when 9 is met ?

apologies meant 9 or more

Community Champion

There's a few ways to do this.

We already have the sum of the checkboxes in Label1.

If we want the color of the text to change to red, you would go to the Color property of Label1 and place a condition:

`If(Value(Label1.Text)>=9, Red, Black)`

This means, "If the value of Label1 is greater than or equal to 9, then make the text color red, otherwise black."

So the If statement works very similarly to Excel.

Microsoft Employee
@8bitclassroom
Helper I

@mr-dang wrote:

There's a few ways to do this.

We already have the sum of the checkboxes in Label1.

If we want the color of the text to change to red, you would go to the Color property of Label1 and place a condition:

`If(Value(Label1.Text)>=9, Red, Black)`

This means, "If the value of Label1 is greater than or equal to 9, then make the text color red, otherwise black."

So the If statement works very similarly to Excel.

yep that worked nicely i used a circle to fill the color based on the label value

now to tweek

if the value is between 0 and 7 - fill green

8 to 13 - yellow

14 - 20 red

how is this acheived ?

Resident Rockstar
If(value >=14 , red, value >=8, yellow, green)
Helper I

@KroonOfficeSol wrote:
If(value >=14 , red, value >=8, yellow, green)

i have a label so this didnt work for me

Resident Rockstar
Value(Yourlabel.text) >= 14
Helper I

@KroonOfficeSol wrote:
Value(Yourlabel.text) >= 14

this only works for 1 condition not 3 so how do i correct ? 0-7 Green, 8-13 Yellow, 14-20 Red.

If(Value(Label9.Text)>=14,Red,Yellow)

Announcements

#### Tuesday Tip | How to Get Community Support

It's time for another Tuesday Tip, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.       This Week: All About Community Support Whether you're a seasoned community veteran or just getting started, you may need a bit of help from time to time! If you need to share feedback with the Community Engagement team about the community or are looking for ways we can assist you with user groups, events, or something else, Community Support is the place to start.   Community Support is part of every one of our communities, accessible to all our community members.   Within each community's Community Support page, you'll find three distinct areas, each with a different focus to help you when you need support from us most. Power Apps: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pa_community_support Power Automate: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpa_community_support Power Pages: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpp_community_support Copilot Studio: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pva_community-support   Community Support Form If you need more assistance, you can reach out to the Community Team via the Community support form. Choose the type of support you require and fill in the form accordingly. We will respond to you promptly.    Thank you for being an active part of our community. Your contributions make a difference!   Best Regards, The Community Management Team

#### Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp