Forum Discussion

DeoYadav's avatar
DeoYadav
Regular Visitor
4 years ago
Solved

Calculated table using DAX

How to get the result as below.   EMP_table      Department_table   Result Table EmpId Name DepName 1 Raj IT 2 Kishor HR 2 Abhi FR 4 Kiran No Department ...
  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    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.