Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello everyone,
I tried to combine 6 columns using :
Column name= 'DataSource'[Column 1]&", "&'DataSource'[Column 2]'&", "&DataSource'[Column 3]&", "& 'DataSource'[Column 4]&", "&'DataSource'[Column 5]&", "&'DataSource'[Column 6]
Some of the column are empty/null so as a result I am getting are:
text,,,,,
text1,text2,,,,
text1,text2,text4,,,
Basically the null value from any column ends up as extra comma at the end.
How can I remove that comma from the end?
Thanks!
Hi @anonymous111
This is easier to resolve from PQ .
You need just 3 steps :
1. Merge columns:
2. replace
'' with '
3. extract text from the first comma:
extract the the text before last comma
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Thank you for the screenshot, but data source I am working on, it doesn't allow me to access pq.
Hi @anonymous111
You can use this DAX:
The updated pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Didn't work-doesn't show any error as well; no changes, is it something to do with string function? trimend function doesn't show up as well.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
73 | |
58 | |
36 | |
32 |
User | Count |
---|---|
90 | |
60 | |
60 | |
49 | |
45 |