cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nithishguptak
Helper II
Helper II

largest and smallest ASCII valued characters in a Datacard

Would it be possible to find the smallest character from a Datacard ? So let's say I have 4 different values from datacard {B, D, A, B}

 

Would it be possible to find A as a smallest character in Powerapps ? 

 

Test.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@nithishguptak 

The Min function is not going to be any help to you in this case as you are dealing with Characters and not Numbers.

You will need to sort the values in order to get what you want.

 

Ex.  

First(Sort([DataCardValue32.Selected.Value, DataCardValue38.Selected.Value], Value)).Value

Will give you the minimum value and:

Last(Sort([DataCardValue32.Selected.Value, DataCardValue38.Selected.Value], Value)).Value

Will give you the maximum value.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

5 REPLIES 5
Nogueira1306
Super User
Super User

With function Min you can do that

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-aggregates

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

@Nogueira1306 am I missing anything ? Im new to powerapps thing is I have to populate other datacard value with respect to minimum value from the above 4 datacard values 

 

Test.PNG

Nogueira1306_0-1643899025176.png

 

RandyHayes
Super User
Super User

@nithishguptak 

The Min function is not going to be any help to you in this case as you are dealing with Characters and not Numbers.

You will need to sort the values in order to get what you want.

 

Ex.  

First(Sort([DataCardValue32.Selected.Value, DataCardValue38.Selected.Value], Value)).Value

Will give you the minimum value and:

Last(Sort([DataCardValue32.Selected.Value, DataCardValue38.Selected.Value], Value)).Value

Will give you the maximum value.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
nithishguptak
Helper II
Helper II

@Rand Thanks for the help. That's what I was Wondering because in my case I cannot use Min because it isnt an integer. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,262)