Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
marru1982
Frequent 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, 

 

Note:- Currently able to concat it , but need solution for dynamic concat , 

 

Column1Column2Concat
AAABikeBike,Car,SUV
AAACarBike,Car,SUV
AAASuvBike,Car,SUV
BBBBoatBoat,Ship
BBBShipBoat,Ship
CCCAeroplaneAeroplane,Drone
CCCDroneAeroplane,Drone

Thanks

1 ACCEPTED SOLUTION

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

 

annonymous1999_0-1691504216106.pngannonymous1999_1-1691504246538.png

 

View solution in original post

5 REPLIES 5
eliasayyy
Memorable Member
Memorable Member

Hello @marru1982 

Measure 2 = 
IF(
    ISFILTERED('Table (2)'[Column2]),
    VAR items = VALUES('Table (2)'[Column2])
    VAR combine = CONCATENATEX(items,'Table (2)'[Column2],"-")
    RETURN
    combine)

 

annonymous1999_0-1691496355619.png

 

 

annonymous1999_1-1691496367814.png

 

annonymous1999_2-1691496381137.png

if i helped you please accept as solution and levaes a thumbs up

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

can you please share the error or your results

Concat.png

Sorry currently there is no error , but concat should work , if i have , both column 1 and column 2 and measure rather than only column1

 

Thanks

 

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

 

annonymous1999_0-1691504216106.pngannonymous1999_1-1691504246538.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.