Forum Discussion

pfarahani's avatar
pfarahani
Helper II
5 years ago

Misery

Hi All,

I have this syntax that creates a table, it works. How can I add a Order by. I want to Order by Alpha, and NumValue. Thanks

 

Department – Slicer =
CALCULATETABLE (
ADDCOLUMNS (
SUMMARIZE ( 'JBSIS Probate Full Report', 'JBSIS Probate Courthouse Department'[DeptAbbreviation], 'JBSIS Probate Courthouse Department'[CourtDept],'JBSIS Probate Courthouse Department'[Alpha],'JBSIS Probate Courthouse Department'[NumValue]),
"Used", 1
)
)

3 Replies

  • Hi pfarahani ,

     

    If your table has been created successfully why not use the standard "Order" functions within PBI?

    • If you are looking at your data using the data view then you can use
      •  

      • or 

         

    • If you are using visuals, hover on top of your visual then click on the ellipse
      •  

    I hope this helps

    H

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    pfarahani I agree with Calvin69. I will add that you could create an additional column in your ADDCOLUMUS function that simply concatenates Alpha and NumValue using the & operator. You can add this to visuals, turn off word wrap and shrink the column width in the visual to hide it in table or matrix visuals . Then you can sort by it in the visual and nobody knows it's there. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI pfarahani,

    AFAIK, power bi does not support sort by multiple columns. You can take a look at the following link to use ISONORAFTER to achieve multiple column sorting:

    Sorting by multiple columns 

    Regards,

    Xiaoxin Sheng