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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pstanek
Post Patron
Post Patron

TOPN

I try to create TOP 20, but I can´t find function RANKX.  I work in direct query. Is there possible to create top 20 in direct query?

1 ACCEPTED SOLUTION
radpir
Resolver II
Resolver II

hi,

 

some of the functions are disabled by default in DirectQuery mode.

to enable them, you need to got to Options and Settings -> Options->Direct Query and then check the Allow unrestricted measures in DirectQuery mode option.

after that you need to restart powerbi and the rankx function should be available.

 

 

View solution in original post

3 REPLIES 3
radpir
Resolver II
Resolver II

hi,

 

some of the functions are disabled by default in DirectQuery mode.

to enable them, you need to got to Options and Settings -> Options->Direct Query and then check the Allow unrestricted measures in DirectQuery mode option.

after that you need to restart powerbi and the rankx function should be available.

 

 

I was always afraid of allowing that option because I don´t know what it will do about all function. I must be sure they will still calculate  correctly.

those functions should work correctly. they are disable for potential performance issues.

here what  Microsoft says about this:

'There are a set of DAX functions that have been disabled by default in DirectQuery mode. This is done in order to avoid performance issues with these functions when working in DirectQuery mode, as these calculations can get very expensive to run in the server.'

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.