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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
jswif4543
Regular Visitor

Measure to Combine Text Values

I am trying to create a measure (I think) to combine text values to use in a map legend.

 

 

Country Thing
Country A

Dogs

Country ACats
Country B

Dogs

Country CDogs
Country CCats
Country CCats

 

And the result I want is 

Country A : Dogs and Cats

Country B : Dogs

Country C: Dogs and Cats

 

 

Without some kind of measure I just end up with one thing, and if I use something like CONCATENATE X I end up with things listed way too many times, I just want one of each thing that occurs. 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@jswif4543 

Measure = CONCATENATEX( DISTINCT('Table'[Thing]), [Thing], " and " )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
jswif4543
Regular Visitor

Brilliant! So glad I got close

Greg_Deckler
Super User
Super User

@jswif4543 

Measure = CONCATENATEX( DISTINCT('Table'[Thing]), [Thing], " and " )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements