cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Ulisses
Level: Power Up

Can´t get a MAX from a collect column!

Hi Guys, several hours later i can´t get over this problem. A have a collection with one  column and multiple rows in that column. I am triyng to pass the MAX of all the rows to a text property in a label, but i am getting the same error (expecting a number) over and over. Can anyone help please? Examples in attach. Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Can´t get a MAX from a collect column!

Hi @Ulisses 

 

Glad to hear that you are able to resolve it. To get the values from a dropdown or combobox control, you need to use DropdownName.Selected.ColumnName. This returns the value from a specific column as the Dropdown.Selected returns a record type response.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

11 REPLIES 11
Super User
Super User

Re: Can´t get a MAX from a collect column!

@Ulisses 

The arguments for the MAX function are (Table, Numerical Formula).  Isn't your column name TaxaRiscoMerca...?  Try these instead.

 

Max(merchandisefees,selectedfees.TaxaRiscoMerca...)
Max(merchandisefees,TaxaRiscoMerca...)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Re: Can´t get a MAX from a collect column!

Hi!

 

Well, I think that the argument you have in the Max formula is for a table (SelectedFees). To define which field you need to find the max of, try this instead:

Max(merchandisefees,selectedfees.TaxaRiscoMerca..)

BR

Pontus

Super User
Super User

Re: Can´t get a MAX from a collect column!

I am not sure if the syntax is correct. The first value should be the datasource which in your case is selectedfees. The next value should be the column name. Please try that and let me know if it doesn't work.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://thepoweraddict.com
Dual Super User
Dual Super User

Re: Can´t get a MAX from a collect column!

Hey @Ulisses 

 

Can you try to use the expression as:

First(Sort(merchandisefees, selectedfees,Descending)).selectedfees

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Super User
Super User

Re: Can´t get a MAX from a collect column!

Hi all,

I'm going to throw in another suggestion here!

It looks like selectedFees might be a child table of merchaniseFees. If that's the case, the following should return the Max value.

Max(First(merchandisefees).selectedFees, TaxaRiscoMerca)

 

Microsoft v-siky-msft
Microsoft

Re: Can´t get a MAX from a collect column!

Hi @Ulisses ,

 

It seems the selectedfess column is nested collection.

If you want the maximum of all selectedfees in merchandisefees, please try this:

 

Max(AddColumns( merchandisefees, "Max of selectedfees", Max( selectedfees, TaxaRiscoMerca ) ) , "Max of selectedfees")

 

Note: TaxaRiscoMerca may be incomplete, fit it to your app.

Best regards,

Sik

Ulisses
Level: Power Up

Re: Can´t get a MAX from a collect column!

Hello,

 

thank very much for your time. After a few new attempts, i realized that the problem was in the way a was creating my collect. I was was passing a "dropdown.SelectedText", but the right way is "dropddown.Select.(fieldname)".

Thanks again for you time and pacience.

 

Best Regards.

Ulisses
Level: Power Up

Re: Can´t get a MAX from a collect column!

Hello,

thank very much for your time. After a few new attempts, i realized that the problem was in the way a was creating my collect. I was was passing a "dropdown.SelectedText", but the right way is "dropddown.Select.(fieldname)".

Thanks again for you time and pacience.

Best Regards.

Dual Super User
Dual Super User

Re: Can´t get a MAX from a collect column!

Hi @Ulisses 

 

Glad to hear that you are able to resolve it. To get the values from a dropdown or combobox control, you need to use DropdownName.Selected.ColumnName. This returns the value from a specific column as the Dropdown.Selected returns a record type response.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,407)