Forum Discussion
marru1982
3 years agoFrequent Visitor
Power BI Desktop
Hi All, Need help to dynamically concatenatex the below scenerio, based on the slicer i.e If a use column2 as a slicer and selected "Bike " then my Concat Column should show only Bike against AAA, ...
- 3 years ago
ok please try
Measure = VAR currentColumn1 = SELECTEDVALUE('Table'[Column1]) VAR selectedItems = ALLSELECTED('Table'[Column2]) VAR filteredItems = CALCULATETABLE( VALUES('Table'[Column2]), 'Table'[Column1] = currentColumn1, 'Table'[Column2] IN selectedItems ) VAR combine = CONCATENATEX(filteredItems, 'Table'[Column2], "-") RETURN combine
eliasayyy
Memorable Member
3 years agoHello marru1982
Measure 2 =
IF(
ISFILTERED('Table (2)'[Column2]),
VAR items = VALUES('Table (2)'[Column2])
VAR combine = CONCATENATEX(items,'Table (2)'[Column2],"-")
RETURN
combine)
if i helped you please accept as solution and levaes a thumbs up
marru1982
3 years agoFrequent Visitor
Thanks , eliasayyy , I tried the measure , but the concat is not working as expected , all the parameters/column name is same Measure = IF( ISFILTERED('Table (2)'[Column2]), VAR items = VALUES('Table (2)'[Column2]) VAR combine = CONCATENATEX(items,'Table (2)'[Column2],"-") RETURN combine)
The Concat needs to work with both Column1 and column2 present in table , but currently the concat works when i place colum1 and measure , rather column1, column2 and measure
Thanks