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 Apps
Answered

Sort by Value

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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);
 [...]
 )
)

 

 

 

Categories:
I have the same question (0)
  • Waegemma Profile Picture
    583 Super User 2024 Season 1 on at

    Hi @Anonymous ,

     

    I notice in the screenshot that the budget sum is preceded by "Budet :", could there be a spelling mistake in the original column name?

     

    Marc

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Its just a Mistake in the Label, not in the Data but thanks for the Info.

  • Waegemma Profile Picture
    583 Super User 2024 Season 1 on at

    Hi @Anonymous ,

     

    Normally, if the column is of the Valuta type and you don't use Value(), the sort is ok. 

     

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

     

    Is there a reason you use Value? 

     

    Marc

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I already tried but it´s the same result 😞

  • Waegemma Profile Picture
    583 Super User 2024 Season 1 on at

    Could you post the complete sort formula? (without the [...])

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Sort(
     If(
     IsBlank(TxtSearch);
     Filter(
     vP_Projects_for_SWOT;
     Mail = User().Email
     );
     Search(
     Filter(
     vP_Projects_for_SWOT;
     Mail = User().Email
     );
     TxtSearch.Text;
     "projectname";
     "projectnumber";
     "customernumber"
     )
     );
     Switch(
     DrpSort.SelectedText.Value;
     "Name";
     projectname;
     "Projektnummer";
     projectnumber;
     "Kundennummer";
     customernumber;
     "Budget";
     Budget;
     "Kostenstelle";
     costcenter;
     "Start";
     startingdate;
     "Ende";
     endingdate
     );
     If(
     DESC;
     Descending;
     Ascending
     )
    )
  • Waegemma Profile Picture
    583 Super User 2024 Season 1 on at

    Hi @Anonymous ,

     

    Thank you. I think the "Budget" option might be skipped. Could you try the following code to check this? I set the Budget sort as Default, so you don't have to select an item in the dropdown, this is just for testing:

     

    Sort(
     If(
     IsBlank(TxtSearch);
     Filter(
     vP_Projects_for_SWOT;
     Mail = User().Email
     );
     Search(
     Filter(
     vP_Projects_for_SWOT;
     Mail = User().Email
     );
     TxtSearch.Text;
     "projectname";
     "projectnumber";
     "customernumber"
     )
     );
     Switch(
     DrpSort.SelectedText.Value;
     "Name";
     projectname;
     "Projektnummer";
     projectnumber;
     "Kundennummer";
     customernumber;
     "Kostenstelle";
     costcenter;
     "Start";
     startingdate;
     "Ende";
     endingdate;
     Budget
     );
     If(
     DESC;
     Descending;
     Ascending
     )
    )
  • Waegemma Profile Picture
    583 Super User 2024 Season 1 on at

    forgot to explain: your gallery should be sorted by Budget as a result

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It is sorted by budget but still alphabetical

  • Waegemma Profile Picture
    583 Super User 2024 Season 1 on at

    Hi @Anonymous ,

     

    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 🙂

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 387

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 301

Last 30 days Overall leaderboard