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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Alexand3rBr
Advocate I
Advocate I

Need assistance on RLS.

Hey everyone,

 

I am currently getting more and more acquainted with PowerBI, however; I am having difficulties trying to get this whole RLS concept down in my head. I have consulted the DAX reference pages on MSDN, however; whenever I try to supply my own DAX input to create RLS rules, it never works as I will explain.

 

I am currently using a testbed dataset which is populated with data fillers. I have 1 table simply called Table1. I created 2 roles to compare what information is seen between the two. The first and top most role is the Top Role which has no restrictions. I then created a second role called Limited Role which will only display limited information.

 

Once I did this, I added DAX input into the Limited Role to see if I could get it to omit data from certain columns. I know that this is a Row-oriented security setting, but can I actually filter our information based on columns? If not, what can I do to display only data from the "Backlogged" column in Table1? Would this require a re-arranged or re-created table, which inverts columns to rows; or is there a way to actually do this?

 

I will show you an example of what I tried:

 

DAX input for Limited Role:

 

tableName[columnName] Greater or Equal to Number

 

Table1[Backlogged] >= "-99999"          <-- This was to make it display Backlogged numbers that are greater or equal to -99999, that way the range would be found above that and would be displayed. The end result displayed no data in my test report.

 

I admit I am rather new to DAX.

3 REPLIES 3
ankitpatira
Community Champion
Community Champion

@Alexand3rBr

Have you checked if BACKLOGGED column is of data type number or text. If it is number you can simply do Table[Backlogged]=-99999 and that should work.

Update:

 

Ok, I changed the operator to a greater than or equal to, and that displayed all columns. Perhaps because this is Row-based, it will cut off rows which pertain to having values in that column, instead of cutting off columns.

 

Table1[Backlogged]>=-999999

 

However, this is not what I want, I am trying to hide all columns except for the backlogged one.

 

Update:

 

I did some testing and set the Dax input to this:

 

Table1[Backlogged]>=0

 

Which essentially erased all rows which had a value of -1 and beyond in then negatives integer line. So it partially works, but it isn't filtering based off columns.

 

Curiosity: Would it be wise for me to redo the table and invert the Columns and rows, so that data can be filtered based off the table header? This seems kind of crude to do it this way, because then that will look weird in the visualizations.

Backlogged Column is a number-based column, it uses a calculation from two other number columns from within the table. That did not work. The Visualizations and the Data sheet visual shows no data from the Backlogged column. Everything is blank, but the headers are visible.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors