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 / How can i use countif ...
Power Apps
Answered

How can i use countif when in condition i want compare another column

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, I have a question, can I use CountIf, if I want to check if there is a value specified for this record in another column?

For example:

 

 CountIf(Shortages.Item, 'Production Line'.Text = "A")

 

Production Line is a column like Item in Table named Shortages

Categories:
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    It's going to depend on where you are trying to put this formula.   Is this a selected item in a gallery?

     

  • ShockWave Profile Picture
    10 on at

    In text label

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    You indicated that this is for the current record.  How are you telling the text label that you have a record selected?   Is the label in a gallery or table for the current record?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    In the gallery

  • Verified answer
    CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Anonymous ,

    Yes ... The formula is quite good, but is a little bit slow for large data sources, as Countif() function iterate through entire data sources checking the formula.

     

     CountIf(Shortages, 'Production Line'.Text = "A")>0

     

    For better results, use:

     

     IsBlank(LookUp(Shortages, 'Production Line' = "A"))

     

    The result will be true if there is no record in Shortages table with condition fulfilled.

     

    Hope it helps !

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    To build on what @gabibalaban said, if you just need to see if the production line column for the selected record is blank.

     

    IsBlank(ThisItem.'Production Line') 

     

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard