Forum Discussion
Calculated table using DAX
- 4 years ago
Hi DeoYadav,
I use selectedcolumns() to do this.
Result Table = SELECTCOLUMNS ( 'EMP_table', "empid", [new EmpID], "name", [Name], "DepName", IF ( ISBLANK ( RELATED ( Department_table[DepName] ) ), "No Department", RELATED ( Department_table[DepName] ) ) )Result:
Pbix in the end you can refer.Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi DeoYadav ,
Can you explain why the second and third rows are the same Empid 2?
If you want get the depName from Department_table, a relationship between these two tables on DepID is needed. Then create the new column in EMP_table via related(Department_table[DepName])
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous4 years agoNot applicable
Hi v-chenwuz-msft , "Can you explain why the second and third rows are the same Empid 2?" - this is the result that I want in a calculated table.
- v-chenwuz-msft4 years agoCommunity Support
Hi DeoYadav,
I use selectedcolumns() to do this.
Result Table = SELECTCOLUMNS ( 'EMP_table', "empid", [new EmpID], "name", [Name], "DepName", IF ( ISBLANK ( RELATED ( Department_table[DepName] ) ), "No Department", RELATED ( Department_table[DepName] ) ) )Result:
Pbix in the end you can refer.Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.