Forum Discussion

DGPBi's avatar
DGPBi
Helper I
2 years ago
Solved

Build a DAX table from another tables

Hi everyone, I have to build a new table with collect certain information (Company name, Legal Code, PlanonID) from my AAD users table.  I built this :  Now the request changed,  I need the same b...
  • Gabry's avatar
    Gabry
    2 years ago

    Hello, 

    based on your requests this is the formula for your table

    Locations = 
    var _filter = DISTINCT(Planon208[Code])
    RETURN
         FILTER(
            DISTINCT(
                SELECTCOLUMNS(ADUser,
                     "PlanonID",ADUser[extensionAttribute6],
                     "CompanyName",ADUser[organizationalPerson.company],
                     "LegalCode",ADUser[extensionAttribute11],
                     "IsInternal",CONTAINSSTRING(ADUser[distinguishedName],"Internal")
                )),
            LEN([PlanonID])>0 && LEN([CompanyName])>0 && LEFT([PlanonID],4)="OBJ0" && LEN([LegalCode])>0 && [IsInternal]=TRUE() && [PlanonID] in _filter
    )