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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Dax max function not working as expected with RLS applied

Hello guys I'll try to be as clear as possible to help you to understing my need.
I have this table in my model with theses values 

type_of_concern_LBtype_of_concern_cdlangColonne

LBcdlangdax( calculate max , filter on cd)
Contract2enContrat
Warranty1enGarantie
Contract2nlContrat
Garantie1nlGarantie
Contracto2esContrat
Garantía1esGarantie
Contrat2frContrat
Garantie1frGarantie

 

The last column is build as following : 

Colonne = CALCULATE(MAX(lb),cd=RELATED(cd))
 
I was expecting this column to be recalculated when the RLS is applied but I get the following result when I apply the RLS :
 
LBcdlangdax( calculate max , filter on cd)
Contract2enContrat
Warranty1enGarantie

 

To give more context I have a Smart filter pro by okviz in the report and this filter is currently populated with the lb column. The goal is to set a default value to avoid user to select a value in order to get data.
Before to apply the translation in the report there was only the fr value and only 2 value in the filter -> there was no problem because I was able to save the report after selecting a value and it was set.
Now I have more value in this column, I get this weird behavior where the filter can only be preselected for a single language. 

Without RLS I have as many value in the filter as I have in the table. So the filter is only preselected for a single language. For other language nothing is selected when I have the RLS applied. The goal was to use this new column that would get the max in order to only have 2 value in the filter. But unfortunately this is not recalculated when the RLS is applied and I can't get the right value as expected.
That's it !

Feel free to come back to me if needed. I'm waiting for yours suggestions now 🙂

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

RLS (Row Level Security) does not impact your data results, meaning that the calculated column won't be impacted in the way the calculation is done.

 

RLS is used to filter out the data for a specific user so when you use the RLS the user will only see the "rows" you allow him to see. and the measures will be calculated accordingly to it.

 

What do you want to achieve? Can you give a better explanation of the final outcome.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

2 REPLIES 2
Anonymous
Not applicable

I was using SmartfilterPro by OkViz which was receiving distinct values from LB columns which was filter when RLS was applied. I was not able to set a default values for all RLS scenario. I've switched with the new Segment Filter from powerBi then I'm able to use the cd as value and use the lb as label which is selecting the first label as the one to display. It avoid to have more than 1 label per cd when the rls is not applied. I'm now able to set the default selection on this filter for all rls cases.

MFelix
Super User
Super User

Hi @Anonymous ,

 

RLS (Row Level Security) does not impact your data results, meaning that the calculated column won't be impacted in the way the calculation is done.

 

RLS is used to filter out the data for a specific user so when you use the RLS the user will only see the "rows" you allow him to see. and the measures will be calculated accordingly to it.

 

What do you want to achieve? Can you give a better explanation of the final outcome.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.