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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Min() non-zero value i...
Power Apps
Answered

Min() non-zero value in collection

(0) ShareShare
ReportReport
Posted on by 51

Hello,

I have a hard-coded collection with 48 records with columns ID and reading.

This is displayed as grid 4 rows by 12 columns using individual text inputs.

 

The number of readings varies depending on the test eg: 3 rows x 6 cols = 18 readings, hence many text inputs will be left blank.

 

Need to determine min and max overall and by row. Max is easy but how to get min while excluding zero values ie: blank fields?

 

Any help appreciated!

 

Categories:
I have the same question (0)
  • Verified answer
    GarethPrisk Profile Picture
    2,828 on at

    You can filter the collection, to exclude blank values, and then derive the Min value.
    For example, a collection:

    Clear(colTemp);
    ForAll(
     Sequence(18),
     Collect(
     colTemp,
     {
     tblValue: If(
     Rand() > .5,
     ThisRecord.Value,
     Blank()
     )
     }
     )
    )

    Then deriving the minimum, non-blank, value from that randomized collection.

    Min(
     Filter(
     colTemp,
     !IsBlank(tblValue)
     ),
     tblValue
    )
  • rmc Profile Picture
    51 on at

    @ GarethPrisk,

     

    Perfect! Thank you and bonus knowledge viz Sequence did not know that one.

     

  • Arjungoud1 Profile Picture
    4 on at

    fiirst(Sort(Filter(Listname,ColumnName>0),ColumnName,
    Ascending)).ColumnName

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard