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 / Calculate Min value fo...
Power Apps
Answered

Calculate Min value for a column in SharePoint

(0) ShareShare
ReportReport
Posted on by 559

Hi all,

I have a combo box which filters the names of the account. When the combo box is selected it must filter the nps score for the selected name and if it is less than 9 it must give popup.

The code on On change of Combo box is : 

If(
    !Is Blank(ComboBox1_7.Selected),
    Min(
        Filter(
           ResponseListData,
            'Account Name' = ComboBox1_7.Selected.Value
        ).NPS,
        NPS < 9
    ),
    Update Context({toggle popup: true})
)
But even if it is less than 9 the popup is not working,
Any help/suggestion on this?
Thanks in advance.
Categories:
I have the same question (0)
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @Uthhra ,

     

    The popup will work when combo box is blank, please check the logic of your formula.

    If you want to get popup as well when get min value, you should use &&.

    If(
     !Is Blank(ComboBox1_7.Selected),
     Min(
     Filter(
     ResponseListData,
     'Account Name' = ComboBox1_7.Selected.Value
     ).NPS,
     NPS < 9
     )&&
     Update Context({toggle popup: true})
    )

     

    Best regards,

    Rimmon

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @Uthhra 

     

    you can also try this:

    If(
     !IsBlank(ComboBox1_7.Selected),
     If(
     Min(Filter(ResponseListData, 'Account Name' = ComboBox1_7.Selected.Value).NPS) < 9,
     UpdateContext({togglePopup: true})
     )
    )
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • WarrenBelz Profile Picture
    154,926 Most Valuable Professional on at

    Hi @Uthhra ,

    Try this

    If(
     Len(ComboBox1_7.Selected.Value) > 0,
     With(
     {
     _Data:
     Filter(
     ResponseListData,
     'Account Name' = ComboBox1_7.Selected.Value
     )
     },
     UpdateContext(
     {
     'toggle popup':
     Min(
     _Data, 
     NPS
     ) < 9
     }
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Sri Profile Picture
    559 on at

    @WarrenBelz 

    But popup is displaying even though the value is less than 9

  • WarrenBelz Profile Picture
    154,926 Most Valuable Professional on at

    @Uthhra , 

    So you want it to be greater or equal to 9 ?

    If(
     Len(ComboBox1_7.Selected.Value) > 0,
     With(
     {
     _Data:
     Filter(
     ResponseListData,
     'Account Name' = ComboBox1_7.Selected.Value
     )
     },
     UpdateContext(
     {
     'toggle popup':
     Min(
     _Data, 
     NPS
     ) >= 9
     }
     )
     )
    )
  • Sri Profile Picture
    559 on at

    @mmbr1606 

    I tried this but getting an error message in .NPS(We expect a number at this point in formula.)

  • Sri Profile Picture
    559 on at

    @WarrenBelz 

    When the NPs is less than 9 it must display popup. I tried the above with function code but Popup is not displaying.

  • WarrenBelz Profile Picture
    154,926 Most Valuable Professional on at

    @Uthhra 

    What are you referring to with .NPS - that is not in the code I posted. Also please confirm NPS is a numeric field.

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @Uthhra ,

     

    Please try this.

    If(
     !Is Blank(ComboBox1_7.Selected)&&
     Min(
     Filter(
     ResponseListData,
     'Account Name' = ComboBox1_7.Selected.Value
     ).NPS)>9,
     Update Context({toggle popup: false},
     Update Context({toggle popup: true})
    
  • Sri Profile Picture
    559 on at

    @WarrenBelz 

    NPS is a numeric field. For filter condition I gave NPS at end this way.

    Filter(
                    ResponseListData,
                    'Account Name' = ComboBox1_7.Selected.Value
                ).NPS

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

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard