Forum Discussion
DGPBi
2 years agoHelper I
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...
- 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 )
Gabry
2 years agoSuper User
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
)DGPBi
2 years agoHelper I
Thanks a lot! ... The code is accepted and number of the locations seems OK.