In my canvas app that's connected to a SharePoint list, I have a gallery with single-select checkboxes. I created a label outside the gallery to count the number of "true" checkbox values in the gallery.
An example of the label's output is:
5 of 10 items completed (50%)
The label's Text property is:
CountRows(Filter(Gallery.AllItems, Checkbox.Checked = true)) & " of " &
CountRows(Gallery.AllItems) & " items completed (" &
Text(CountRows(Filter(Gallery.AllItems, Checkbox.Checked = true)) /
CountRows(Gallery.AllItems) * 100, "[$-en-Us]0%") & ")"
This works well, but each time the app starts, I get this error: "Invalid operation: Division by zero."
In the app's settings under "Experimental," I have "Formula-level error management" turned on. (If I turn it off, my gallery doesn't patch to SharePoint correctly for some reason).
Any ideas on how to satisfy the "Division by zero" error?