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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Need help listing string items in a column in a table

Hello everybody,

 

I'm a DAX and BI newbie, so please forgive me if this is this is a "duh" moment.

 

In learning DAX, I created a Matrix table that lists "Yearly Income" ranges on rows and then I created a DISTINCTCOUNT measure that lists how many "Occupations" from my dim table (5 occupations total) are represented in each salary range.

 

DAX_problem.PNG

 

Over on the left are the five occupation options available.

 

I was challenging myself to create a new measure that would, in a column, basically concatenate once each occupation represented in my distinct count of occupation column. So, for example, in my $160,000 salary bracket that has 2 occupations represented, if those two occupations were "Management" and "Professional", in the next column I wanted "Management, Professional" to appear.

 

Everything I tried would return every occupation per customer, leading to thousands of occupations strung one after another.

 

Other stuff I tried just broke the table and couldn't be displayed, or created other odd things.

 

I tried various combinations of CONCATINATE, CONCATINATEX and DISTINCTCOUNT, but with no luck.

 

Is this something do-able?

 

Thanks everybody. The forums have become a great tool for me.

1 ACCEPTED SOLUTION
GilbertQ
Super User
Super User

Hi @Anonymous

 

Try this following measure below, which should give you the desired result

 

Occupations Represented = CONTATENATEX(VALUES('Tablename'[Occupation]),
    'TableName'[Occupation],",")




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

3 REPLIES 3
GilbertQ
Super User
Super User

Hi @Anonymous

 

Try this following measure below, which should give you the desired result

 

Occupations Represented = CONTATENATEX(VALUES('Tablename'[Occupation]),
    'TableName'[Occupation],",")




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

Awesome! That did it. Thanks a ton guavaq. I'm in awe of your DAX mastery! 🙂

Happy to help out @Anonymous

 

And we all hard to start at some point, I have no doubt you will gain knowlege the more you work with DAX.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.