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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

EXCEPT function not working as expected

Hi,

 

I am trying to show a table with Corporate Units and Locations to which the user does not have access to, called Access. Corporate Units and Locations are dimensions that have DLRS (Dynamic row level security enabled on them).

I am using the except function like this:

 

Access = except(AllCorpLocation, CorpLocation)
 
The AllCorpLocation table is an import table that is a query from SQL Server containing all possible Corporate Units and Locations. The second argument is a query (also Import) that is dependant (has a relationship) on a view called vw_Dashboard_Permissions (which is imported), which contains user permissions for using DRLS. It has the Corporate Units and Locations that the current user (through their UPN), has access to.
 
This is the AllCorpLocation table :
 
jgligorevic1_0-1620834954486.png

 

 

This is the CorpLocation table:

 

jgligorevic1_1-1620835293852.png

 

I cannot understand why my Access table returns nothing for a user which does not have access to all Corporate Units and Locations, what I expected to see was to see the Corporate Units and Locations that this user has no access to. (as part of the except function logic).

 

Any thoughts as to why this might be?

 

Thank you

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

After my continuous testing, due to the DAX restrictions in DirectQuery, I did not find a replacement function. It is recommended that you replace the connection mode with the import mode.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

EXCEPT function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

 

Reference: https://docs.microsoft.com/en-us/dax/except-function-dax#remarks

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi Stephen,

 

Thank you for your answer. What alternative could I use to get the desired result?

Anonymous
Not applicable

Hi @Anonymous ,

 

After my continuous testing, due to the DAX restrictions in DirectQuery, I did not find a replacement function. It is recommended that you replace the connection mode with the import mode.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors