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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Using DAX to select a specific column based on RLS result

Hello community,
I try to manage translation in my report but it's a mess 😕
I've a fact table that contains severals columns to manage translation. Based on the user language that is stored in a user table I would like to use the right column in my fact table.
The user table is used in the RLS and the username is used to filter this table. When I activate the RLS the user table is correctly filtered.
My fact table is like: 

Operationfr_transen_transes_transgb_transuser_trans
      

 user_trans is defined as like: 

user_trans = IF (MAX('TOP_USER'[PREFERRED_LANGUAGE_CD]) ="FR", OCCASIONS_OPERATIONS[fr_trans], IF (MAX('TOP_USER'[PREFERRED_LANGUAGE_CD]) ="EN", OCCASIONS_OPERATIONS[en_trans], IF (MAX('TOP_USER'[PREFERRED_LANGUAGE_CD]) = "GB", OCCASIONS_OPERATIONS[gb_trans],IF (MAX('TOP_USER'[PREFERRED_LANGUAGE_CD]) = "ES", OCCASIONS_OPERATIONS[es_trans], OCCASIONS_OPERATIONS[fr_trans]))))
There is no direct relation between both table.
When I try to view as an user with PREFERRED_LANGUAGE_CD = "FR" I get results in another language. It's like if the RLS applied is not considered when this column is field.

Any Idea ?
 
Edit

In the repport pane I've a table with 
usernamePREFERRED_LANGUAGE_CDtest
(the one used for RLS)FRPL

test = MAX(TOP_USER[PREFERRED_LANGUAGE_CD]). test is in the fact table

As I can see the test column do not use the restriction and take all values available before RLS is applied. How can I base the column on RLS result please guys ?

1 REPLY 1
lbendlin
Super User
Super User

RLS stands for ROW level security.  You cannot influence columns through that. Look into OLS instead.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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