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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
rob_vander
Helper I
Helper I

Hidden column in condition to create new dimension

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)?

4 REPLIES 4
rob_vander
Helper I
Helper I

No one has any solution?

rob_vander
Helper I
Helper I

@amitchandak @marcorusso  can you help?

rob_vander
Helper I
Helper I

@kushal_chawda thanks but it doesn't work

kushal_chawda
Frequent Visitor

@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.

UserNameDisplayColumn
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. 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Kudoed Authors