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.
Hi,
I want to create a new column, which should show the manager value. Sharing my expected column,
Associate | Manager | Client | Expected column |
a | 1 | b | 2 |
b | 2 | b | 2 |
c | 3 | c | 3 |
d | 3 | d | 3 |
e | 4 | f | 2 |
f | 2 | f | 2 |
g | 1 | g | 1 |
h | 4 | h | 4 |
i | 2 | x | NA/Null |
j | 1 | y | NA/Null |
k | 4 | z | NA/Null |
As per above result in 1st row the new client is 'b' who is under manager '2'. So as per this the value of new column should become '2' but is showing the same value of manger as '1'.
The other condition should be if there is new value in client column then it should not print any value(NA/Null) in new column.
But what i am getting is,
Associate | Manager | Client | Resul column |
a | 1 | b | 1 |
b | 2 | b | 2 |
c | 3 | c | 3 |
d | 3 | d | 3 |
e | 4 | f | 4 |
f | 2 | f | 2 |
g | 1 | g | 1 |
h | 4 | h | 4 |
i | 2 | x | 2 |
j | 1 | y | 1 |
k | 4 | z | 4 |
Please help and advice what to do in such cases?
Solved! Go to Solution.
you can try this
Column = maxx(FILTER('Table','Table'[Associate]=EARLIER('Table'[ Client])),'Table'[Manager])
Proud to be a Super User!
@Anya_T
You can use LOOKUPVALUE function:
Expected = LOOKUPVALUE(Table1[Manager],Table1[Associate],Table1[ Client])
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi, thank you for replying.
I tried but getting an error. How can i rectify it?
Sharing screenshot.
user_id= Associate
manager_id= Manager
Associate= Client
There are multiple values for one or more results, I assumed you had one record per match.
it's your call.
you can have a separate table for the combination without duplicates
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
you can try this
Column = maxx(FILTER('Table','Table'[Associate]=EARLIER('Table'[ Client])),'Table'[Manager])
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |