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
ronaldg
Frequent Visitor

Get column values depending on user details

I have 2 tables here, the user details table and the learnings table.

Scenario:
I will log in as johnsmith@test.com in the dashboard, I want to get the Learning Title that matches my details(Rank, MG and SL). Or should I say I want to get the Learning Titles that are applicable to me depending on my Rank, MG and SL.
For example, 
I am johnsmith, since my rank, mg and sl matches the learning title 1's rank, mg and sl, I want to get the learning title.

Is that possible with Power BI?


Learning.PNGuser.PNG

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @ronaldg ,

 

According to your statement, I think you can try to configure dynamic RLS in Power BI Desktop.

For reference:

Row-level security (RLS) with Power BI - Power BI | Microsoft Learn

Dynamic Row Level Security with Power BI Made Simple

I suggest you to merge [Rank]/[MG]/[SL] columns in both tables.

Merage Column = COMBINEVALUES("-",Learnings[Rank],Learnings[MG],Learnings[SL])
Merge Column = COMBINEVALUES("-",'User Details'[Rank],'User Details'[MG],'User Details'[SL])

Data model:

vrzhoumsft_0-1685947193333.png

Configure rls in manage roles.

vrzhoumsft_1-1685947224953.png

When you view as  johnsmith@test.com, you will only see data in "Learning Title 1":.

vrzhoumsft_2-1685947252647.png

 

Best Regards,
Rico Zhou

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

View solution in original post

4 REPLIES 4
v-rzhou-msft
Community Support
Community Support

Hi @ronaldg ,

 

According to your statement, I think you can try to configure dynamic RLS in Power BI Desktop.

For reference:

Row-level security (RLS) with Power BI - Power BI | Microsoft Learn

Dynamic Row Level Security with Power BI Made Simple

I suggest you to merge [Rank]/[MG]/[SL] columns in both tables.

Merage Column = COMBINEVALUES("-",Learnings[Rank],Learnings[MG],Learnings[SL])
Merge Column = COMBINEVALUES("-",'User Details'[Rank],'User Details'[MG],'User Details'[SL])

Data model:

vrzhoumsft_0-1685947193333.png

Configure rls in manage roles.

vrzhoumsft_1-1685947224953.png

When you view as  johnsmith@test.com, you will only see data in "Learning Title 1":.

vrzhoumsft_2-1685947252647.png

 

Best Regards,
Rico Zhou

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

Hi @v-rzhou-msft 
Actually, have another step to do, I have another table(Completed Learning Report). Once I identified what's applicable learning to me. I want to check if learnings in learnings table are present in the completed learning report. If not, then I want to display those learnings that are not present in both tables or not yet completed.
Completed.PNG

Can you help me with this?

Exactly what I need, Thanks @v-rzhou-msft .

lbendlin
Super User
Super User

Please read about Row Level Security.  And about the difference between a dashboard and a report.

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.