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 / Counting rows and show...
Power Apps
Unanswered

Counting rows and showing "N/A' when If is false

(0) ShareShare
ReportReport
Posted on by 50

Hello everyone,
I'm counting rows in a collection based on the data showing in a label of a gallery and columns in the collection. This is what I'm using today and it works. The only issue is that this will show 0% if there are none as well as if the count comes back as 0%. Wondering if there is away to have it show "N/A" is the count comes back as NULL.
 
Text(CountIf(SiteRTWData,RTWCompleted.Value="Yes",Manager=Title10_10.Text)/ ((CountIf(
        SiteRTWData,RTWCompleted.Value="No",Manager=Title10_10.Text)+CountIf(
        SiteRTWData,RTWCompleted.Value="Yes",Manager=Title10_10.Text))),"[$-en-US]#,#0.0000")*100 & "%"

Categories:
I have the same question (0)
  • rsaikrishna Profile Picture
    3,703 on at

    @Willo 

     

    You can place below entire formula in the label's Text property as below:

     

    UpdateContext( { varFormulaValue:  Text(CountIf(SiteRTWData,RTWCompleted.Value="Yes",Manager=Title10_10.Text)/ ((CountIf(
            SiteRTWData,RTWCompleted.Value="No",Manager=Title10_10.Text)+CountIf(
            SiteRTWData,RTWCompleted.Value="Yes",Manager=Title10_10.Text))),"[$-en-US]#,#0.0000")*100 & "%" } )

     

    if( varFormulaValue = "0%", "N/A",varFormulaValue)

     

    Give a try and let me know if you run into any issues.

     

    Regards

    Krishna Rachakonda

    If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard