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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ikelaiah
Advocate I
Advocate I

Sorting columns in a calculated table with FILTER(), is it possible?

Hi,

 

I have the following filtered calculated table.

 

Active Job Records Table = 
FILTER('job records data', 
        'job records data'[job_start_date] <= NOW() && 
        'job records data'[job_end_date] >= NOW() &&
'job records data'[job_status] = "t" )
 

Is it possible to sort calcualted table based on the following columns?

'job records data'[pay_level] descending
'job records data'[job_start_date] descending
'job records data'[job_start_date] descending

 
Thanks in advance.

 

-ikel

1 ACCEPTED SOLUTION

Hi  @ikelaiah ,

 

Yes,you can use Rankx as a variable then use filter to get the rows you need:

https://docs.microsoft.com/en-us/dax/rankx-function-dax

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@ikelaiah , I a table visual, you can put all these columns and can do multiple column sort using shift and click

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

That does the trick. But is it possible to do FILTER() and sort/order by at the same time?

Hi  @ikelaiah ,

 

Yes,you can use Rankx as a variable then use filter to get the rows you need:

https://docs.microsoft.com/en-us/dax/rankx-function-dax

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.