Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all!
Below I have two tables, with one active relationship (teamid-teamid) and one inactive relationship (personnellnumber-reportsto).
Is it possible to make a DAX that says (pseudo):
If teamlead = "Yes" then USERELATIONSHIP(table1[personnellnumber], table2[reportsto]),
otherwise use existing relationship
And on both, [email] = USERPRINCIPALNAME() should be applied.
I'm can't determine if this is an if, switch or calculate solution..
Solved! Go to Solution.
Hi @Anonymous
If amitchandak's suggestion doesn't lead you to a solution, please have a look at my suggestion.
Based on my understanding, you have employees part of whom are leaders.
1.
If Table1 contains all employees including leaders and common employees,
Table2 contains the scoresor other information for all employees in Table1.
If so, please refer to the article:
Dynamic Row Level Security with Manager Level Access in Power BI
2.
If Table1 contains parts of employees including leaders and common employees,
Table2 contains parts of employees including only common employees, no leaders.
Your requirement is to show information for specific member:
eg,
lead of team 1 will see all information of this team,
employee 2 will only see his own information.
If so, please refer to my pbix:
Steps:
(1)
In edit queries, in Table2(employee table), append table1 to table 2,
at the same time, make some transformations for table 2
Next, filter Table1(leader table) to contain rows isteamlead=true/1/yes
Close&&apply
(2)
Create relationship
(3)
manage role
Finally
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Hi @Anonymous
If amitchandak's suggestion doesn't lead you to a solution, please have a look at my suggestion.
Based on my understanding, you have employees part of whom are leaders.
1.
If Table1 contains all employees including leaders and common employees,
Table2 contains the scoresor other information for all employees in Table1.
If so, please refer to the article:
Dynamic Row Level Security with Manager Level Access in Power BI
2.
If Table1 contains parts of employees including leaders and common employees,
Table2 contains parts of employees including only common employees, no leaders.
Your requirement is to show information for specific member:
eg,
lead of team 1 will see all information of this team,
employee 2 will only see his own information.
If so, please refer to my pbix:
Steps:
(1)
In edit queries, in Table2(employee table), append table1 to table 2,
at the same time, make some transformations for table 2
Next, filter Table1(leader table) to contain rows isteamlead=true/1/yes
Close&&apply
(2)
Create relationship
(3)
manage role
Finally
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try something like this
Sales 9 = VAR Column1= SELECTEDVALUE ( dim[DimColumn1]) VAR Column2 = SELECTEDVALUE ( Sales[Second]) var Column3 =SUMMARIZE(Sales,Sales[Column1]) var Column4 =SUMMARIZE(Sales,Sales[Column2]) RETURN if(ISBLANK(Column1), CALCULATE( SUM (Sales[Sales]), dim[DimColumn1] in Column3 ,USERELATIONSHIP(dim[DimColumn1],Sales[First]) ),CALCULATE( SUM (Sales[Sales]), dim[DimColumn1] in Column4 ,USERELATIONSHIP(dim[DimColumn1],Sales[Second]) ))
Sorry, could you clarify?
Is this in Manage Roles, or are you making a measure/column here?
User | Count |
---|---|
103 | |
90 | |
78 | |
72 | |
68 |
User | Count |
---|---|
108 | |
96 | |
95 | |
74 | |
71 |