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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

Remove Final Comma and Space from Concatenated Column

Hello,

 

I've created a column in my data that has a nested concatenation to determine when a cell within three particular columns has a blank value. The concatenation is working and allows me to display a user friendly message with all of the missing fields in one column. My issue is that I am unable to remove the trailing ", " from the text string that is produced. Is it possible to modify my DAX to drop the last two characters of the string?

 

Here is my current DAX:

QA Issue = CONCATENATE(IF('Consolidated RAID Log'[Event]=BLANK(),"Missing Event, ",""),CONCATENATE(IF('Consolidated RAID Log'[Owner]=BLANK(),"Missing Owner, ",""),CONCATENATE(IF('Consolidated RAID Log'[Due Date]=BLANK(),"Missing Due Date, ",""),"")))
 
Screenshot of current output:
Lowghen_0-1674770332920.png

Thank you!

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try:

QA Issue = 
  VAR __String = CONCATENATE(IF('Consolidated RAID Log'[Event]=BLANK(),"Missing Event, ",""),CONCATENATE(IF('Consolidated RAID Log'[Owner]=BLANK(),"Missing Owner, ",""),CONCATENATE(IF('Consolidated RAID Log'[Due Date]=BLANK(),"Missing Due Date, ",""),"")))
  VAR __Result = IF(RIGHT(__String, 1) = ",", LEFT(__String, LEN(__String) - 1), __String)
RETURN
  __Result


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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try:

QA Issue = 
  VAR __String = CONCATENATE(IF('Consolidated RAID Log'[Event]=BLANK(),"Missing Event, ",""),CONCATENATE(IF('Consolidated RAID Log'[Owner]=BLANK(),"Missing Owner, ",""),CONCATENATE(IF('Consolidated RAID Log'[Due Date]=BLANK(),"Missing Due Date, ",""),"")))
  VAR __Result = IF(RIGHT(__String, 1) = ",", LEFT(__String, LEN(__String) - 1), __String)
RETURN
  __Result


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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

 

Hi Greg,

 

Thank you so much for your quick reply. I had to make some small adjustments, but this was exactly what I needed! 

 

I used your version and updated the Right function to look for a space and changed the - 1 to a - 2  to account for the additional space after the comma:

  VAR __Result = IF(RIGHT(__String, 1) = " ", LEFT(__String, LEN(__String) - 2), __String)
 
Thanks again!
 

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.

Top Kudoed Authors