Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
pfarahani
Helper II
Helper II

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 3
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Greg_Deckler
Super User
Super User

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


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Calvin69
Helper III
Helper III

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
    • Calvin69_0-1630377038252.png

       

    • or Calvin69_1-1630377081636.png

       

  • If you are using visuals, hover on top of your visual then click on the ellipse
    • Calvin69_2-1630377185837.png

       

I hope this helps

H

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.