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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
stitch_es
Frequent Visitor

Conditional Formatting being removed when using Row Level Security

Hi - Hope someone on here can help me.

I have a simple report that shows logs per user on a daily basis.  The idea is to highlight when they skipped a day (or days) of logging in.  My code has the current scan date, and I have a field that calculates the difference between current date and previous scan date to know if it's more than 1.

 

I then have conditional formatting - if the difference is > 1 change background to orange.  All is working perfectly - until row level security kicks in. If you are viewing the report and able to see all data, it's fine.  If you log in as a user who only can see a subset of data then the conditional formatting gets removed.  See below for screenshots:

 

All Data:

stitch_es_1-1722886021275.png

Viewing data that only has access to site 838 - no formatting:

stitch_es_0-1722885983714.png

 

I have searched the web, but can't find anything.  Anybody have any ideas??

 

1 ACCEPTED SOLUTION

Hi - Thank you so much for responding.

When cleaning up the file to share with you, I was making my DirectQuery all into Direct Import mode so that the pbix wouldn't need to connect to the db.  Then it worked and the formatting stayed the same.  Is there something with Direct Query that would prevent the conditional formatting to carry over when being filtered?  The value that it is using to determine the formatting does not change - see below:

all data:

stitch_es_0-1722919394236.png

using RLS:

stitch_es_1-1722919443396.png

 

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@stitch_es , can you add the value on the visual, in which conditional formatting is done? I doubt that is also changing here.

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi - Thank you so much for responding.

When cleaning up the file to share with you, I was making my DirectQuery all into Direct Import mode so that the pbix wouldn't need to connect to the db.  Then it worked and the formatting stayed the same.  Is there something with Direct Query that would prevent the conditional formatting to carry over when being filtered?  The value that it is using to determine the formatting does not change - see below:

all data:

stitch_es_0-1722919394236.png

using RLS:

stitch_es_1-1722919443396.png

 

Anonymous
Not applicable

Thanks for the reply from @amitchandak , please allow me to provide another insight:

Hi, @stitch_es 

Based on our understanding of what you need to seek, there are no similar problems so far, and here's how I measured it:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_0-1722923436456.png

vlinyulumsft_1-1722923436457.png
2.Next, I'll modify each column of the visualization like this:


 

vlinyulumsft_2-1722923499311.png

 

3.Then I created the following RLS:
 

vlinyulumsft_3-1722923499312.png

 

4.Using this role to observe, here are the actual results

vlinyulumsft_4-1722923550463.png

Here's the version number I'm using:
 

vlinyulumsft_5-1722923561072.png

 

It is recommended that you try to upgrade the version according to your needs to see if this can solve the problem, the following is the official link:

 Download Microsoft Power BI Desktop from Official Microsoft Download Center

 
Of course, if you have any new ideas, you are welcome to contact us.
 

Best Regards,

Leroy Lu

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

 


 

I am on the latest Power BI Build.  You will not be able to duplicate it unless you have a direct query linked to the data.  When I created tables or used Import the issue went away.  I'm assuming it's a Direct Query bug or limitation of some sort.

Anonymous
Not applicable

Hi,@stitch_es 
We are very glad to know that the issue has been resolved.But I don't currently find any documentation to support your idea.This could be a great discovery.
 
Since your solution is effective, consider accepting your solution as a solution that will also benefit other community members who have the same problem as you and find a solution faster.

Of course, if there is anything else we can do for you, please do not hesitate to contact us.

Looking forward to your reply.

Best Regards,

Leroy Lu

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.