Forum Discussion

ashutoshbafna's avatar
ashutoshbafna
Regular Visitor
3 years ago
Solved

Ordering in visual

I want sequence as 1,2,3,....10,11,12. 

  • Hi ashutoshbafna ,

     

    You can create custom order in Power query. Please follow steps below.

     

    1. Go to Query Editor

    2. Go to Add column then Click Extract and Select Text Before Delimeter

     

    3. Type : (colon) as delimiter. Hit OK

     

    4. You'll have this column. Just change type to whole number.

     

    5. Close and apply. Go back to Report view 

    6. In Fields Pane, Select your variable for the x-axis and then go to column tools. Click Sort by column and then select Text Before Delimiter.

     

    7. Click 3 dots in your visual and then Sort axis and sort ascending

     

     

     

    Let me know if it works ðŸ˜‰

     

     

     

     

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi

     

    Click on the three dots bellow, then click on "Sort Axis" and select the field you want to sort to

     

     

    Kind regards,
    José
    Please mark this answer as the solution if it resolves your issue.
    Appreciate your kudos! 🙂

    • ashutoshbafna's avatar
      ashutoshbafna
      Regular Visitor

      Hi, by sorting that way sequence i am getting as 1,10,11,12,2 ; i want as 1,2,3,4 

  • Hi ashutoshbafna ,

     

    You can create custom order in Power query. Please follow steps below.

     

    1. Go to Query Editor

    2. Go to Add column then Click Extract and Select Text Before Delimeter

     

    3. Type : (colon) as delimiter. Hit OK

     

    4. You'll have this column. Just change type to whole number.

     

    5. Close and apply. Go back to Report view 

    6. In Fields Pane, Select your variable for the x-axis and then go to column tools. Click Sort by column and then select Text Before Delimiter.

     

    7. Click 3 dots in your visual and then Sort axis and sort ascending

     

     

     

    Let me know if it works ðŸ˜‰

     

     

     

     

  • Arul's avatar
    Arul
    Super User

    ashutoshbafna ,

    try this,

    Step 1: In power query editor click the above column (field used in the Y-axis) use Extract and then Text Before Delimiter. Now you have new column.

     


    Step 2: Rename the new column from Text Before Delimiter to "New name".
    Step 3: Change the datatype of new column from text to whole number.Then, close and apply.
    Step 4: Now go to the data view in desktop and click the above column used in Y-Axis and the sort this column based on the newly extracted column. You will get see expected the result in your visual.
    refer the attached image,

     

    Thanks,