cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Fricki97
New Member

Sort by Value

Hi,

I´ve got an App, which shows several Projects in a Gallery. The Projects are saved in a SQL-Table.

The Budget is sortet alphabetical and not by value. I set Budget as Value(Budget) but it wont sort it right. Did somebody got an Idea?

 

2022-08-29 10_59_59-Power Apps.png

 

 

 

Sort(
Source_with_filters_and_stuff;
Switch(
    DrpSort.SelectedText.Value;
    [...];
    "Budget";
    Value(Budget);
    [...]
    )
)

 

 

 

12 REPLIES 12
Waegemma
Super User
Super User

Hi @Fricki97 ,

 

Sorry, I misunderstood: I thought it didn't sort on Budget, but alphabetical on Title... Now I see what you mean: it sorts on the numbers left to right. Okay, so this has something to do with the valuta/numbers settings. I will look into this, could take ten minutes 🙂

Waegemma
Super User
Super User

Hi @Fricki97 ,

 

I can't recreate the issue here (it just works) but I might have a quick fix:

 

Sort(
Source_with_filters_and_stuff;
Switch(
    DrpSort.SelectedText.Value;
    [...];
    "Budget";
    Text(Budget;"000000000");
    [...]
    )
)

 

This should pad you Budget values with leading zeros, it will still sort alphabetically but because of the zeros it will look like it's sorted on Value. If you have Budgets of over 100 million, just add some zeros to the formula ...

 

Hope this helps,

 

Marc

Fricki97
New Member

It feels like cheating but it works. Thanks a lot Marc

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 (2,693)