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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
peterhui50
Helper III
Helper III

Is there a way to make CONCATENATEX dynamic in a measure?

I have this table here. I have created a calculated column and it meets our needs to some extent but fails when users want to slice.

peterhui50_0-1613095258539.png

the path column is a calculated column so if users slice by the top 2 entires of NAME A, it will still give all the concatenated entries.

 

 

It really should just be a measure and concatenate by Level 1 A -> Level 2 A when user selects the first two entries for NAME A

 

peterhui50_1-1613095377074.png

 

I tried several things first, instead of a calculated column, I used a measure, but to create the measure, it seems like this fails.

Measure = CONCATENATEX(ALLEXCEPT('Table (4)','Table (4)'[NAME]),'Table (4)'[Job],"=>")
 
it starts giving me ALL of the job entries. I thought ALLEXCEPT would provide a grouping based on NAME column here? Not sure what I am doing wrong. Why would it do that a column but not in a measure??
 
Any help would be greatly appreciated.

 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @peterhui50 ,


May wish to create this formula in the measure, by filtering the Data field in the "Filter", you can see the dynamic change of the value of the path in the card.

Path = 
CALCULATE (
    CONCATENATEX ( DISTINCT ( 'Table'[Job] ), [Job], ">>" ),
    ALLSELECTED ( 'Table'[Date] )
)

Capture.PNGCapture.PNG

 

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-henryk-mstf
Community Support
Community Support

Hi @peterhui50 ,


May wish to create this formula in the measure, by filtering the Data field in the "Filter", you can see the dynamic change of the value of the path in the card.

Path = 
CALCULATE (
    CONCATENATEX ( DISTINCT ( 'Table'[Job] ), [Job], ">>" ),
    ALLSELECTED ( 'Table'[Date] )
)

Capture.PNGCapture.PNG

 

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks, I had one other grouping and using this formula, I added

 

Measure 2 =
CALCULATE (
CONCATENATEX ( DISTINCT ( 'Table (4)'[Job] ), [Job], ">>" ),
ALLSELECTED ( 'Table (4)'[Action_Type] ),ALLEXCEPT( 'Table (4)', 'Table (4)'[NAME],'Table (4)'[Action_Type])
)
 
now the path is dynmaic based on the action type . Thank you for your solution! 
peterhui50
Helper III
Helper III

Thanks for your response.

 

I tried the measure but it still doesn't do what I wanted to do. When I filtered by two dates, the measure still concats the whole column instead of the jobs that are within the specific range. I'm wodering if ALLSELECTED needs to be in play here? 

 

peterhui50_0-1613137346932.png

 

amitchandak
Super User
Super User

@peterhui50 , Try like

 

Measure = calculate(CONCATENATEX(distinct('Table (4)'[Job]), [Job],"=>"), ALLEXCEPT('Table (4)','Table (4)'[NAME]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors