Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I have applied OLS on column through tabular editor. There are few columns which should be hidden for some roles. But actually that column is used as dimension of graph (other users have access to that column). What I want is if user for which that column is hidden, I want to show other colum as dimension in same graph. Is there a way to create conditional dimension in grpah like, if(ColumnHidden, ShowOtherCoumn, SameColumn_Not_Hidden_for_other_user)?
No one has any solution?
@rob_vander There could be other way around but I can think of below which is not straightforward
1) You need to create UserDetails table with UserName and DisplayCoulumn. UserName will be email address which could be referenced by USERPRINCIPALNAME(). DisplayColumn will capture the name of the column you want to display for that user. eg. you table would look like below. 'TableName' will be name of your data table where dimensions are stored.
UserName | DisplayColumn |
user1@abc.com | 'TableName'[Column1] |
user2@abc.com | 'TableName'[Column2] |
2) Create Dynamic RLS Role using Manage Role from Modelling tab. Apply filter condition on UserDetails table as below for that role
[UserName] = USERPRINCIPALNAME()
3) Create DAX measure as below to capture the name of the column for that user.
DynamicColumn= VALUES(UserDetails[DisplayColumn])
4) Create a Dimension parameter with any dimension and then update the parameter as below to include DAX measure which will capture dynamic column name
Dimension -Parameter = {
("Column Name", [DynamicColumn], 0)
}
5) Call the Dimension - Parameter in your chart as dimension.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
21 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |