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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ianmonat
Helper I
Helper I

Text field in table visualization - need to wrap text in double quotes upon export

Hello,

 

Looking to do a seemingly simple task that has proven difficult.

 

I have a table vizualization with some fields (see below). I need to export this data table to a .csv, and then convert it to a .txt file. (i do this by just renaming the .csv file extension after the export)

 

I need the values below, to be wrapped in quotes in the .txt file, so for example, the first Cust No. value should read "102" in the text file.  

 

table visualization screenshot - need these fields wrapped in quotestable visualization screenshot - need these fields wrapped in quotes

 

I can wrap these values in quotes using the following formula: QuotesCustNo = """" & ShipTable[Customer] & """"

(note: Cust No. is an alias for ShipTable[Customer]) 

 

Capture1.JPG

This works, but unfortunately, it works in Power BI only. When I export to .csv and then convert to .txt, the output looks like this:

 

Capture2.JPG

 

I've tried to create a column that contains all double quotes and use the CONCATENATE formula with the Cust No. column, but no luck there either. 

 

I've also tried combining 2 single quotes in the folrmula above thinking I could trick Power BI into displaying a double quote, but it still looks like two, distinct single quotes.

 

I've seen other threads that are similar but they are not trying to accomplish this specific objective so I thought I'd create a new thread. 

 

Help please! @MattAllington are you around? -Ian 

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @ianmonat,

 

I was able to reproduce this problem, when using the Export to CSV feature on the visuals, they get all the extra """" characters in csv file. Oneworkaround is to open CSV file in notepad, then replace all """ with "".

2.PNG

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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

1 REPLY 1
v-yulgu-msft
Employee
Employee

Hi @ianmonat,

 

I was able to reproduce this problem, when using the Export to CSV feature on the visuals, they get all the extra """" characters in csv file. Oneworkaround is to open CSV file in notepad, then replace all """ with "".

2.PNG

 

Regards,
Yuliana Gu

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

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.