web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

Double filter on sharepoint list column

(0) ShareShare
ReportReport
Posted on by 413
Hi there, 
 
 
I have a sharepoint list called "Tracelot - Origini dosatori" and a column called "Dosatore". Other columns are "Origin" and "Active" (yes/no")
 
The values are compodes by a letter and a number: the possible letters are "S" and "O".
 
For example, I could have S1, S2, S3, S4, S5, O1, O2.
 
In a gallery I set the Items property with a Filter (italian configuration): 
 
Filter(
        'Tracelot - Origini dosatori';
        Attivo = true;
        Linea = VarLinea
)
 
 
 
But I need to order them FIRST by letters (first the S) and then by numbers, in order to see this order: S1, S2, S3, S4, S5, O1, O2.
Actually If I put anothe row in the list with "Dosatore" = S3 and I active that, I would see S1, S2, S4, S5, O1, O2, S3.
Hope I made this easy to understand..
 
Any idea?
Thanks
Categories:
I have the same question (0)
  • Suggested answer
    SaiRT14 Profile Picture
    1,988 Super User 2025 Season 2 on at
    Double filter on sharepoint list column
    pls try the following:
     
    Replace your Items property in the gallery with this formula:
    SortByColumns(
        AddColumns(
            Filter(
                'Tracelot - Origini dosatori';
                Attivo = true;
                Linea = VarLinea
            ),
            "LetterPart", Left(Dosatore, 1),  // Extract the letter part (S or O)
            "NumberPart", Value(Mid(Dosatore, 2, Len(Dosatore) - 1))  // Extract the numeric part
        ),
        "LetterPart", Ascending,  // First sort by letters (S before O)
        "NumberPart", Ascending   // Then sort by numbers
    )
     
    this should fix your issue, let me know if you still have issues.
  • Suggested answer
    timl Profile Picture
    35,805 Super User 2025 Season 2 on at
    Double filter on sharepoint list column
    Hi  Calcioscacchi 
     
    Something like this should work. For Dosatore values that begin with S, this prefixes it with "A-". For Dosatore values that begin with O, the prefix is "B-". 

    Therefore, the final result will order the S records before the O records.
     
    Sort(
       Filter(
               'Tracelot - Origini dosatori';
               Attivo = true;
               Linea = VarLinea
       );
       If(
            Left(Dosatore; 1) = "S"; "A-" & Dosatore;
            Left(Dosatore; 1) = "O"; "B-" & Dosatore;
            "C-" & Dosatore
       );
       SortOrder.Ascending
    )
     
  • Calcioscacchi Profile Picture
    413 on at
    Double filter on sharepoint list column
     
    Thanks, This did the job.
     
    Just a correction: the letter order is Descending:
     
    SortByColumns(
        AddColumns(
            Filter(
                'Tracelot - Origini dosatori';
                Attivo = true;
                Linea = Radio1_1.Selected.Value
            );
            'LetterPart'; Left(Dosatore; 1);  // Extract the letter part (S or O)
            'NumberPart'; Value(Mid(Dosatore; 2; Len(Dosatore) - 1))  // Extract the numeric part
        );
        "LetterPart"; SortOrder.Descending;  // First sort by letters (S before O)
        "NumberPart"; SortOrder.Ascending   // Then sort by numbers
    )
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard