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 August 31st. Request your voucher.

Reply
Anonymous
Not applicable

RLS

Hi,
I  am facing some issue while implementing the RLS for below fact table.

main_fact_table

job_noyear
IT1232023
IT1234672024
IT2352023
IT23452024
IT3452023
IT3342024
IT36472023
IT36542024
IT65842023
IT65742024

 

user_access

user namejob_noyear
souravIT122023
jeetIT62023
kunalIT62024
souravIT32024
jeetIT22023
kunalIT12024
rupamIT32024
rupamIT62023


as i mentioned there is two table.

1)main_fact_table  (this is the main facr table)
2)user_access  (this is the details of user who has access to the perticuler data)

these two table are disconnected table hence they have no relation between them, and we are using the coloumn "job_no" (user_access) to decide the access for a perticuler user but in the "user_access" table column "job_no" dose not contain the full value we need to implement wildcard here for example in user_access  one user named "sourav" has access to the row  job_no in fact table  whose value starts with  "IT12" AND "IT3" so sourav should she all the rows in "main_fact_table" whose "job_no" starts with "IT12" AND "IT3" and corrosponding year also should take in considaration

in this case sourav should see in "main_fact_table" as below shown

job_no

year
IT1232023
IT3342024
IT36542024
3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

You can follow the steps below to get it, please find the details in the attachment.

1. Create a fuzy match table 

Table = 
ADDCOLUMNS (
    'user_access',
    "job_no2",
        CALCULATE (
            MAX ( 'main_fact_table'[job_no] ),
            FILTER (
                'main_fact_table',
                IFERROR ( SEARCH ( 'user_access'[job_no], 'main_fact_table'[job_no], 1, 0 ), 0 ) > 0
                    && 'main_fact_table'[year] = 'user_access'[year]
            )
        )
)

2. Create a role and add a filter with the formula:

[job_no] IN CALCULATETABLE(VALUES('Table'[job_no2]),FILTER('Table','Table'[year]=[year]&&'Table'[user name]=USERNAME())) 

vyiruanmsft_0-1704961185167.png

Best Regards

Anonymous
Not applicable

Thanks, for the effort but there is a small changes in the requirement 

rls.PNG

i want the third row as well for user named "sourav" to have access in the 'main_fact_table' cause in the 'user_access' table "sourav" has access to the "job_no" in 'main_fact_table' whose value starts with IT3 for the 'year'= 2024 as well 

Final access for sourav i have attached in the screenshot.

Anonymous
Not applicable

need help kindly find the solution

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.