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 Apps
Answered

Cnavas App

(0) ShareShare
ReportReport
Posted on by 24

Hey there,

 

I am new to PowerApps. I am building a Canvas App in which I am creating a List of questions(they are in SharePoint) with drop down. I am trying to build a tab or button in which I want to show that how many questions are completed and how many left. for example I six have questions so It would be like |_2_out_of _6_| question are completed. 

 

2022-04-07 (1) (1).png

 

Please help me out here. 

It would be really appreciated. Thanks 

Categories:
  • BCLS776 Profile Picture
    8,994 Moderator on at

    To do this, you will perform a CountRows() on two Filter() queries of your list: one Filter() contains the set of questions that need to be answered (6 in your example) and the other contains the set of questions that are completed (2 in your example).

     

    If that gives you enough to go, go for it. However, if you need more specific help please share:

    • the name of your list
    • The column names that contain the questions, answers, and whatever other criteria define the questions a particular user will see (your gallery's Items property will have much of this info)
    • Tell us how you are saving the answers back to the list, ie using the OnChange of the dropdown or some sort of OnSelect on a "save" button

    Bryan

  • Chillpill Profile Picture
    24 on at

    @BCLS776 

    Hey Bryan,

     

    Thank you so much for your help. Well, I got the idea, but it would be great if you would help me specifically with it. As I told you before I am building an inspection app In which I have questions. I have pasted a picture below. 2022-04-09_LI.jpg

    So on every inspection button, I have questions in them. I wanna show that 2 questions were completed out of 7 so the user can see from the outside rather than go inside the inspection button. 

    I have two SharePoint lists one contains questions and another answers such as completed or not completed. I have pasted the pictures below. 

    • list name = Foq
    • Answer list= FOQAnswers

    2022-04-09 (1).png

    2022-04-09 (2).png

     

    You can see my column's Name is Title in both lists, the first Title column (in the first list) has questions and second title(in the second list) contains answers completed or not completed. 

    Hope for your prompt response. Thanks again. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I would try something like the code below. You count the rows/items of the Gallery where the dropdown value is not (<>) a dash.

    CountRows(Filter(YOURGALLERYNAME.AllItems, DROPDOWNNAME.Value <> "-"))

  • BCLS776 Profile Picture
    8,994 Moderator on at

    To give the app the ability to distinguish between which questions go with which inspection, I think you need to add one more column to the FOQ and FOQAnswers list to help identify that. In my examples below, I am calling it "InspectionName" and handling it as a single line of text column. You may also need a column to identify which set of answers you are working with, such as an inspection date, inspection ID, or some other identifier (maybe that's what "Suffix" is for?).

    Now, you can begin constructing your Filter() statements. A count of the possible questions for an inspection would look something like: CountRows(Filter(FOQ, InspectionName = "Fit-out Inspection"))

     

    Similarly, a count of the completed questions would look something like: CountRows(Filter(FOQAnswers, InspectionName = "Fit-out Inspection", Title = "Completed", Suffix = 2))

     

    Bryan

  • Chillpill Profile Picture
    24 on at

    Hi, I tried to use this function in my app. CountRows(Filter(colFoq.Answer, Dropdown2.Selected.Value <> "-")).

     

    To explain my formula, 'colFoq' is my collection name which is linked to my gallery as a data source. "Answer" is a column I've created in my collection and linked it to Dropdown 2. 

     

    The formula is not giving an error. However, it does not show the number of questions without the value "-". It just shows the total number of questions, which is 5, when the answer to any number of questions is not "-". 

     

    SS Powerapps2.pngSS Powerapps.png

  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    Have you tried?:

     

    CountRows(Filter(colFoq, Answer <> "-"))

     

    Note, this will only work if the OnChange property of Dropdown2 is updating colFoq as the user makes changes. Otherwise, the count won't change.

     

  • Chillpill Profile Picture
    24 on at

    Thank you so much! It works! This helped me so much. I have also posted another question that is related to the same app. Would you be able to have a look at that as well? It would be much appreciated. 

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/undefined/td-p/1545265

  • Chillpill Profile Picture
    24 on at

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard