Forum Discussion
magnusks
Helper I
2 years agoCombine concatenatex and selectedvalue
Hi all. I have a table showing workhours per employee. Each employee might work on various projects and at different departments at the company. I have a factstbl where the workhours are stored, ...
- Anonymous2 years ago
Hi magnusks ,
Here's another idea, you can also try the following.
1. Create calculated table -- use the columns of the new table as slicers.
Table = DISTINCT('DimEmpl'[Dep])2. Create measure.
List of projects = var _select=SELECTCOLUMNS('Table',"Dep",'Table'[Dep]) var _empl= SELECTCOLUMNS( FILTER(ALL('DimEmpl'),'DimEmpl'[Dep] in _select),"emp",'DimEmpl'[Empl]) var _projectkey= SELECTCOLUMNS( FILTER(ALL('Facts'),'Facts'[Empl] in _empl),"projectkey",'Facts'[ProjectKey]) var _con= CONCATENATEX( FILTER(ALL('DimProjects'), 'DimProjects'[ProjectKey] in _projectkey),'DimProjects'[Project],"-") return IF( NOT( MAX('DimEmpl'[Dep])) in _select,BLANK(), IF( ISFILTERED('Table'[Dep]),_con, "Na") )3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
2 years agoNot applicable
Hi magnusks ,
Here's another idea, you can also try the following.
1. Create calculated table -- use the columns of the new table as slicers.
Table =
DISTINCT('DimEmpl'[Dep])
2. Create measure.
List of projects =
var _select=SELECTCOLUMNS('Table',"Dep",'Table'[Dep])
var _empl=
SELECTCOLUMNS(
FILTER(ALL('DimEmpl'),'DimEmpl'[Dep] in _select),"emp",'DimEmpl'[Empl])
var _projectkey=
SELECTCOLUMNS(
FILTER(ALL('Facts'),'Facts'[Empl] in _empl),"projectkey",'Facts'[ProjectKey])
var _con=
CONCATENATEX(
FILTER(ALL('DimProjects'),
'DimProjects'[ProjectKey] in _projectkey),'DimProjects'[Project],"-")
return
IF(
NOT( MAX('DimEmpl'[Dep])) in _select,BLANK(),
IF(
ISFILTERED('Table'[Dep]),_con,
"Na")
)
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
magnusks
Helper I
2 years agoAnonymous ,
Thank you. That worked! 🙂