web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Count number of empty ...
Power Apps
Answered

Count number of empty fields in a form using Power Apps

(0) ShareShare
ReportReport
Posted on by 12

Hi, I have a SharePoint List that I'm customizing using PowerApps. My list has over 200 columns and I want to find a way to display how many empty columns are left once someone starts a new entry. For example, when starting, it should display (200 columns blank) and as more and more columns are completed, that number should decrease accordingly.

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    mmollet Profile Picture
    3,187 on at

    This is similar to another request from earlier today but you have many more columns. The same thing should work but might take a bit to code! (copy paste will be a godsend here)

     

    Sum(

    If(IsBlank(DataCardValue1), 0, 1),

    If(IsBlank(DataCardValue2), 0, 1),

    If(IsBlank(DataCardValue3), 0, 1),

    If(IsBlank(DataCardValue4), 0, 1),

    If(IsBlank(DataCardValue5), 0, 1),

    etc...

    )

     

    Do the above for each of the 200 and then as they are answered you will add 1 until all are answered and 200/200. You can put this in a textbox/label or use it to augment the size of a rectangle to use as a progress bar etc. 

     

    Progress Bar:

    • Create a label (backLabel)
      • make the border 2
      • make the background no color
      • make the width 600 and the height 80
    • Now create a second label (frontLabel)
      • make the border 2
      • make the background Color.LimeGreen
      • make sure it is directly on top of the first label and has the same height
      • make the width equal to: (Value(LabelWithTotalAnswered.Text)/200) * backLabel.Width (pictures below for example of how it would look)

    Screenshot 2023-03-09 at 3.31.07 PM.png

     

    Screenshot 2023-03-09 at 3.31.19 PM.png

     

    Screenshot 2023-03-09 at 3.31.30 PM.png

     

    If you dont want the total showing, you would still need the label with the total showing so you could just send it to the back of the screen and make it not visible. that way the completion bar can still read the value it needs to work but users wont have to see it. It is just a middle man essnentially to help clean up the code.

     

    Little more than you asked for but oh well. GL!

  • bocoman1 Profile Picture
    2 on at

    Thank you for this solution.

     

    I wanted to also add that if you are doing this with a variable total, it is the same process, but instead of using a hard coded number (200 in this case) you are able to input variable divided by variable. I do not print total or number complete, just a percent. I have implemented this and the only issue that I run into is when the form/app is first opened, it notifies the user of a 'divide by 0' error. Other than that error, it works perfectly.

     

    bocoman1_0-1702419113836.png

     

    This is the expression that I used to get my percentage, where label63 is visible fields (total fields), label63_2 is completed fields and label63_1 is fields marked as not applicable.

    Text((Value(Label63_2.Text) / (Value(Label63.Text) - Value(Label63_1.Text)))*100, "0.0%")

     

    I had to use this solution as my form has 7 possible combinations of total fields. Formatting and everything else in the solution post is the same.

     

    Also, since mine is part of a SharePoint form rather than an app, I needed the percentage to show in the list so that the user can glance at the field and know if it is complete or not. To do this, I added another column to the list, inserted into the form, copied the formula from the progress bar and changed visible to "false" so that it does not show on the form.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,033

#2
Valantis Profile Picture

Valantis 632

#3
11manish Profile Picture

11manish 607

Last 30 days Overall leaderboard