cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mannug Frequent Visitor
Frequent Visitor

How to convert Values (Some Column Name) to CSV in DAX?

Hi All,

 

I have the data in columns,

 

VALUES (Some Column) and I wanted to somehow with DAX, convert column rows into a CSV - Row1, Row 2, Row 3, etc.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to convert Values (Some Column Name) to CSV in DAX?

Hi @mannug ,

Here are two output for your scenario.

Firstly, if you want to get the output below, you could use dax expression.

dax output.PNG

You could create the measure with the formula below.

Measure = CONCATENATEX('Table1','Table1'[Column],",")

If you want to get the Apple, Banana, Grape as a column name, you could achieve in Query Editor.

1. Transpose the Table.

2. Merge the columns.

3. Use first Row as header

Untitled.png

Hope this can help!

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: How to convert Values (Some Column Name) to CSV in DAX?

Hi @mannug ,

I'm afraid that we cannot change the column name in the original table with dax.

If it is convenient, could you share some data sample and your desired output so that I could understand your scenario better and try other ways.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mannug Frequent Visitor
Frequent Visitor

Re: How to convert Values (Some Column Name) to CSV in DAX?

Hi there,

 

Thanks for your message.

 

I am looking to convert some values returned in a column to comma separated values.

 

For e.g.

Input-

ALLSELECTED ('Products'[Product Name])

 

Apple

Banana

Grape

 

SOMEHOW WRITE A DAX TO MAGICALLY OUTPUT - CSV LIST

 

Apple, Banana, Grape

 

I hope this helps. Looking forward to any solution. Thanks.

 

Community Support Team
Community Support Team

Re: How to convert Values (Some Column Name) to CSV in DAX?

Hi @mannug ,

Here are two output for your scenario.

Firstly, if you want to get the output below, you could use dax expression.

dax output.PNG

You could create the measure with the formula below.

Measure = CONCATENATEX('Table1','Table1'[Column],",")

If you want to get the Apple, Banana, Grape as a column name, you could achieve in Query Editor.

1. Transpose the Table.

2. Merge the columns.

3. Use first Row as header

Untitled.png

Hope this can help!

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

mannug Frequent Visitor
Frequent Visitor

Re: How to convert Values (Some Column Name) to CSV in DAX?

THANK YOU VERY MUCH!!

 

I cant believe it was that simple. Smiley Wink

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 339 members 3,351 guests
Please welcome our newest community members: