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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
imarco62
Regular Visitor

How to create a file with double quotes around the fields

Hello, 

I need to generate a file from Power BI where ueach field is sorrounded by double quotes as follows:

"field1","filed2", "fieldn"

Is this possible? How?

Thank you.

5 REPLIES 5
Anonymous
Not applicable

Hi, @imarco62 

May I ask if you have gotten this issue resolved? If it is solved, please share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.


If it is not resolved, I hope you will provide the full .pbix file via OneDrive or SharePoint. Please be careful to remove all sensitive information and we will do our best to provide ideas for your issue.

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I am waiting on the Power BI team to respond. Will post the results as soon as I have them. Thank you.

Anonymous
Not applicable

Hi, @collinq 

Thanks for your concern about this issue.

And I would like to share some additional solutions below.

 

Hi, @imarco62 

I am glad to help you.

 

According to your description, you want to create a file with double quotes around the fields?
If I understand you correctly, then you can refer to my solution.

 

You can try to enclose the fields in double quotes directly in Power Query Editor using M language. 

As in my example below: 
 

vfenlingmsft_0-1723517075201.png

let
    Source = Excel.Workbook(File.Contents("XX\XX\XX.xlsx"), null, true),
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"field1", Int64.Type}, {"field2", type text}, {"field3", type text}}),
    AddQuotesToColumns = Table.TransformColumnNames(#"Promoted Headers", each """" & _ & """")
in
    AddQuotesToColumns

 

Result:

vfenlingmsft_1-1723517075202.png

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

collinq
Super User
Super User

Hi  @imarco62 , 

How about this link:
https://learn.microsoft.com/en-us/https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-...

 

Specifically this bit:  

("ABC") Display the string inside the double quotation marks (" ").

 




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Hello,

The link did not work

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.