cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Batrisyia_
Helper I
Helper I

Arrange number in ascending order

Hi everyone,

Does anyone know on how to arrange number in ascending order for data table. I've tried to use sort by column and somehow it returned not in order. Here's the code:

SortByColumns(
Filter(
Mastercopy_1,
SYSTEM = Dropdown1.Selected.Result,
'Sub System'= Dropdown4_1.Selected.Result,
'EQUIPMENT TYPE'= Dropdown5_1.Selected.Result,
COMPONENT= Dropdown6_1.Selected.Result
),
"OPERATING_x0020_TEMP_x0020_(°C)",Ascending)

 

Batrisyia__0-1605062799146.png 

Batrisyia__1-1605062916993.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User III
Super User III

@Batrisyia_ 
Your numbers appear to be stored as text so why not convert them to numbers in your datasource and your original code will work.

 

If you cannot make the conversion here's another way to do it without.

Sort(
    Filter(
        Mastercopy_1,
        SYSTEM = Dropdown1.Selected.Result,
        'Sub System'= Dropdown4_1.Selected.Result,
        'EQUIPMENT TYPE'= Dropdown5_1.Selected.Result,
        COMPONENT= Dropdown6_1.Selected.Result
    ),
    Value('OPERATING_x0020_TEMP_x0020_(°C)'),
    Ascending
)

 

---
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."

View solution in original post

3 REPLIES 3
mdevaney
Super User III
Super User III

@Batrisyia_ 
Your numbers appear to be stored as text so why not convert them to numbers in your datasource and your original code will work.

 

If you cannot make the conversion here's another way to do it without.

Sort(
    Filter(
        Mastercopy_1,
        SYSTEM = Dropdown1.Selected.Result,
        'Sub System'= Dropdown4_1.Selected.Result,
        'EQUIPMENT TYPE'= Dropdown5_1.Selected.Result,
        COMPONENT= Dropdown6_1.Selected.Result
    ),
    Value('OPERATING_x0020_TEMP_x0020_(°C)'),
    Ascending
)

 

---
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."

View solution in original post

Thank you @mdevaney. Finally the code is working. May I know how to convert them into number in datasource?

@Batrisyia_ 
Change the column type from single line text to number if you are using SharePoint.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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