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
Syndicate_Admin
Administrator
Administrator

Concatenate only when a field has a value; otherwise leave the value equal

Hello everyone
I have created the following DAX code, where I am concatenating all Orders that have the same Memo number
ORDERS = CONCATENATEX(VALUES(Lista_Pedidos[Sales document]),Lista_Pedidos[Sales document],",")

The problem is that I am concatenating all orders that do not have values in the Memo column, but what I need is that when I do not find values in the Memo column, the order number remains unconcatenated.

Hcardenass_1-1694027502042.png

Try placing filter, but what it does, is that the orders appear blank as shown in the image

DaxTest = CALCULATE(CONCATENATEX(VALUES(Lista_Pedidos[Sales Document]),Lista_Pedidos[Sales Document],","),FILTER('Lista_Pedidos',NOT(ISBLANK('Lista_Pedidos'[Memo]))))

Hcardenass_0-1694027467633.png

Porfa how could I solve it? , I need your support thank you.

10 REPLIES 10
parry2k
Super User
Super User

@Syndicate_Admin you have to do exactly what I provided, Your screenshot is showing which is not what I provided.

If you cannot copy and paste, I don't know what else to say. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Syndicate_Admin
Administrator
Administrator

Any more idea of how to solve this problem?, I've been figuring out how to do it for days porfa

Syndicate_Admin
Administrator
Administrator

I am creating a measure :

TABLE NAME: ORDER LIST

NAME Columns : Memo , Sales Documents

Hcardenass_1-1694039749880.png

Then to be able to concatenate I create the following measure:

DAX = CONCATENATEX (VALUES ('Lista_Pedidos'[Sales Document]),Lista_Pedidos[Sales Document],",")

and I place the memo field and add that measure that I created where it is concatenated

Hcardenass_0-1694039601411.png

parry2k
Super User
Super User

@Syndicate_Admin are you adding a column or measure?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Syndicate_Admin
Administrator
Administrator

I tried it, but the "isblank" function does not accept a table, and the following error is generated

Hcardenass_1-1694038601483.png

parry2k
Super User
Super User

@Syndicate_Admin it is still the same, I have no idea why but try this, I'm assuming you are adding a measure:

 

 

ORDERS = 
IF ( ISBLANK ( SELECTEDVALUE ( Table[Memo Column] ) ), <<Order number column>>,
CONCATENATEX(VALUES(Lista_Pedidos[Sales document]),Lista_Pedidos[Sales document],",")
)

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Syndicate_Admin
Administrator
Administrator

Sorry, Ready now if it should already appear

parry2k
Super User
Super User

@Syndicate_Admin maybe it is a language issue, again I don't see columns in the DAX expression anywhere in the screenshots.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Syndicate_Admin
Administrator
Administrator

@Syndicate_Admin Sorry for the confusion, I just corrected the publication giving a little more detail, was it understood?. Thank you for the support

parry2k
Super User
Super User

@Syndicate_Admin not fully sure what you are looking for, columns you are using in the DAX expression is not showing up in the screenshots. Could you provide more details with the sample data and the expected output.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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
Top Kudoed Authors