Forum Discussion
Using checkboxes to create percentage bar
- Feb 16, 2024
Including the values on the worksheet to give an alternating pattern is a step backward because it makes any calculation harder. The formula I would use is
= BYROW(status * {60,20,10,10,10}%, LAMBDA(x, SUM(x)))which spills to return the entire column of overall percentages.
[Look out for the new checkboxes when the come available; they are much better to set up and use]
I am pleased that the ideas may be of some value to you. If you miss the information provided by the percentage weightings you could insert them as a range, possibly above the headings. Were you to do that, you could even reference the values from that range in place of using the array constant as I did.
Another user has suggested using Yes/No pull down as this eliminates Form Control, then use Card View to make it more compatible. I'm happy with this, but the formula you assisted me with isn't going to work with this. Therefore, can you suggest a formula that essentially does the same thing, but works when yes is selected?
- PeterBartholomew1Mar 03, 2024Silver Contributor
I have hopes that the Insert/CellControls/CheckBox that is currently out for beta-testing on Windows machines will eventually find its was to other platforms because it is there that they are most needed.
Dropdowns can be set to work with TRUE/FALSE or 1/0, in which case they can be used directly by the existing formulas. If you opt for "Yes"/"No" a slight modification to any dependent formula is required
= BYROW((StatusYesNo="Yes") * {60,20,10,10,10}%, LAMBDA(x, SUM(x)))Note the new name was 'StatusYesNo' was introduced simply because 'Status' is still in use on the original sheet. Something else that should happen sometime over the coming months is that it should be possible to simplify the formula to read
= BYROW((StatusYesNo="Yes") * {60,20,10,10,10}%, SUM)but not yet.
- CraigPauleyMar 03, 2024Copper ContributorThanks Peter, didn't even think about keeping it as True/False! Changed to this and it works perfectly. Even better than before, its a fraction of the size and formatting is much easier.