Forum Discussion
dgenatossio
8 years agoFrequent Visitor
Unique column values
I have read through dozens of posts and haven't found a post with an answer for the problem I'm encountering. I have two data tables. One has Plan for the Year. The other has Results. I want to c...
- 8 years ago
One way through DAX. Create the employee list as below. If it is not your case, please post some sample data and expected output.
employees = DISTINCT ( UNION ( SELECTCOLUMNS ( plan, "empid", plan[Employee ID] ), SELECTCOLUMNS ( result, "empid2", result[Employee ID] ) ) )
Eric_Zhang
8 years agoMicrosoft Employee
One way through DAX. Create the employee list as below. If it is not your case, please post some sample data and expected output.
employees =
DISTINCT (
UNION (
SELECTCOLUMNS ( plan, "empid", plan[Employee ID] ),
SELECTCOLUMNS ( result, "empid2", result[Employee ID] )
)
)
dgenatossio
8 years agoFrequent Visitor
Thanks, this worked perfectly. And could you also tell me how to create a table with multiple columns? Say the employee's home state for example, which could be found on either the results table of the plan table. Is there a way to bring that data over as well?