Reply
ikelaiah
Advocate I
Advocate I
Partially syndicated - Outbound

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

Syndicated - Outbound

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

Syndicated - Outbound

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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Syndicated - Outbound

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

Syndicated - Outbound

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!

 

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)