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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.