Forum Discussion

CC852's avatar
CC852
Frequent Visitor
2 years ago
Solved

How to sort Grouped items

I have managed to combine some prices but now they are not in the order I would like:

 

I would like them to display as $1-$3 then $5-$10 then $20+

 

How can I sort the grouped items manually?

 

 

  • You can add a new table to do it or add a new column in your current and categorise your price ranges.
    If you share your file I can help you with this

5 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    CC852 

    well, this should be ordered automatically . 

    if it not , 

    you can create the groupings in power query,

    then create a power query conditional column where you specify the index for each group , 

     

    at then end , in power bi , 

    use the sortby column : 

    and sort the group column by the index created . 

     

     

    also if possible , you can share your file so i can take a look at it . 

     

     

    let me know if this works for you .

     

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

  • _AAndrade's avatar
    _AAndrade
    Resident Rockstar

    Create a ID for each range of price that you defined, and after order your column by the ID that you created.
    For example:
    ID | RangeName
    1  | $1-$3
    2  | $5-$10
    3 | $20+

    After use  "Sort by Column" and choose "ID"

     

    • CC852's avatar
      CC852
      Frequent Visitor

      Do I need to create a new table for the prices and the desired groups first?

      • _AAndrade's avatar
        _AAndrade
        Resident Rockstar

        You can add a new table to do it or add a new column in your current and categorise your price ranges.
        If you share your file I can help you with this