Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a table with a column called Author which contains both employee names and manager names. I created a measure that checks another column called Employee Name to see if the names are within the Author column to produce a value of either "Employee" or "Manager" (Is the Author an Employee or a Manager?). I was able to get the results I want from the measure but in order to use that information in my analysis I need to create a new column with these values. I need help converting my DAX measure to a new custom column.
Here is my measure:
Solved! Go to Solution.
Hi @Anonymous
Seems they are both in the same table. You can simply do
Author is Employee =
IF (
'GetDevelopmentGoalDetail'[Column1.Author] = 'GetDevelopmentGoalDetail'[Employee Name],
"Employee",
"Manager"
)
or even
Author is Employee =
IF (
'GetDevelopmentGoalDetail'[Employee Name] = BLANK ( ),
"Manager",
"Employee"
)
Hi @Anonymous
Seems they are both in the same table. You can simply do
Author is Employee =
IF (
'GetDevelopmentGoalDetail'[Column1.Author] = 'GetDevelopmentGoalDetail'[Employee Name],
"Employee",
"Manager"
)
or even
Author is Employee =
IF (
'GetDevelopmentGoalDetail'[Employee Name] = BLANK ( ),
"Manager",
"Employee"
)
Thank you, how could your first example be modified if it was [Employee Name] is in another table? If I simply change the table name in the current solution, an error of 'A table of multiple values was supplied where a single value was expected' is thrown. @tamerj1
@Anonymous
Is there a relationship between the two tables?
Yes, there is another table that has Employee Name.
@Anonymous
Yes, nut my question was: is the Employee table related to the GetDevelopmentGoalDetail table?
Yes, they both contain Employee Name.
@Anonymous
Let me be more specific. Do you have or have you created an active relationship between the two tables?
Yes. Already established.
@Anonymous
Thrn you can try
Author is Employee =
IF (
RELATED ( 'GetDevelopmentGoalDetail'[Employee Name] ) = BLANK (),
"Manager",
"Employee"
)
however, in this case I'm wondering why @FreemanZ didn't work 🤔
I will mark you solution above as correct, but was curious if the column was from another table. The data is called from an API and there are some repetative datasets. Was checking to confirm accuracy of my original results. Thank you.
hi @Anonymous
try like:
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |