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
LolaVeci
Regular Visitor

Report Builder export to csv double quotes

We need to use Report Builder to reproduce a custom format for a CSV that was generated with another tool.

The file's peculiarities are mainly two:
1. The values ​​of the headers and the data have to be enclosed in double quotes ("")
2. The report headers are multilingual, and this means that the different translations are treated in the report, so that when exporting to CSV, both the column name and the translation are included in the report. We have managed to hide the column names, but Report Builder inserts a blank line (these are the column names, although they are not displayed) when it performs the export and we want it to disappear.
1 ACCEPTED SOLUTION

Hi @LolaVeci ,
Thank you for your patience! I truly appreciate your time and effort in clarifying your requirements. Your detailed explanation has provided valuable insight.

  1. Right-click on the column header ,Click Expression.
  2. Update the expression to enclose the header text in double quotes
    • Repeat this step for all column headers.
  3. Right-click on each data field in the Tablix (one column at a time).
  4. Click Expression.
  5. Use the following format to enclose the data in double quotes:
    • Replace the existing value with:
      = """" & Fields!YourColumnName.Value & """"
    • Repeat this for all data columns(except headers) in the table.


Please refer the screenshot for more understanding.

vpagayammsft_0-1742288886820.png

 

This is the exported csv output.

vpagayammsft_1-1742287014735.png

 

I hope this solution works for you.If this helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

Thank you for being a part of the Microsoft Fabric Community Forum!



View solution in original post

11 REPLIES 11
v-pagayam-msft
Community Support
Community Support

Hi LolaVeci ,

Can you please confirm whether you have resolved issue. If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. This will be helpful for other community members who have similar problems to solve it faster. 

If we don’t hear back, we’ll go ahead and close this thread.Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.

Thank you.

Regards,
Pallavi.

v-pagayam-msft
Community Support
Community Support

Hi @LolaVeci ,
I wanted to check in on your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply that helped you or sharing your answer and accept it as answer. It would be greatly appreciated by others in the community who may have the same question.

Thank you for being a part of the Microsoft Fabric Community Forum!


LolaVeci
Regular Visitor

If I put No Output, it does not show me the header of the report and if I put Output, it repeats the header. I need it to be displayed like this in Excel:

Imagen2.png

In Excel it is displayed like this:

Imagen3.png 

Hi @LolaVeci ,
Thank you for the confirmation.

1.Modify expressions for both headers and data fields using below expression:
= """" & Fields!YourField.Value & """"

2.Right-click each individual data column except header row.

  • Click Properties → Find DataElementOutput.
  • Set DataElementOutput = NoOutput
  • Do NOT set NoOutput for the entire header row. This would remove the headers completely.

3.Run the report in Report Builder.
Click Export ,then select csv to exprot the file.
Attaching the output screenshot for your reference

vpagayammsft_0-1741692834109.jpeg


If this post helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

Thank you for being a valued member of the Microsoft Fabric Community Forum!


v-pagayam-msft
Community Support
Community Support

Hi @LolaVeci ,

Thank you for reaching out to the Microsoft Fabric Community Forum about the issue you are encountering.

To export a properly formatted CSV from Report Builder with quoted headers and data, follow below suggestions.It might assist you in resolving the issue.

1.Enclose headers and data in double quotes:

Update expressions in the table cells:

="""" & FieldsValue.Value & """"

For multilingual headers:

="""" & Lookup(Parameters!Language.Value, Fields!LanguageCode.Value, Fields!HeaderText.Value, "HeaderDataset") & """"

2.Using Tablix,

  • Click on the header row in your table.
  • open the Properties Pane (or go to View > Properties).
  • Locate the DataElementOutput property.
  • Set it to NoOutput.
  • Repeat this for all header textboxes.


Refer below screenshot for detailed understanding.

vpagayammsft_0-1741338494264.jpeg

 

 

If this post helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

 

This option isn't correct; the headers are repeated on each row, and I don't want that.
I only want the headers to appear in the first row.

Hi @LolaVeci ,
Thanks again for providing the detailed information.

To ensure that only the headers appear in the CSV export while hiding the data rows, follow these steps.
1.Modify the DataElementOutput property. Right-click each header textbox , open the Properties Pane, and set DataElementOutput = Output, ensuring the headers appear in the CSV.

2.Next, for the data fields, right-click each field , open the Properties Pane, and set DataElementOutput = NoOutput, which prevents data from being included in the CSV export.

3.Additionally, to completely hide data rows, apply row visibility settings. Right-click the entire data row , select "Row Visibility," choose "Hide," and enter the expression =True, ensuring that the rows never appear .

4.Once these settings are applied, run the report in Report Builder, export it as a CSV .Please refer below screenshot.

vpagayammsft_0-1741775687585.png

 

Based on my understanding, I have provided the expected output. If this solution meets your requirements, please consider accepting it as the solution.

Regards,
Pallavi.


Maybe I didn't explain myself well:
I want a single header on the first line, with the detailed data below (I don't want the header to be repeated when exporting to CSV).
I need it to display in Excel once exported to CSV, like this:
imagen4.png

Hi @LolaVeci ,
Thank you for your patience! I truly appreciate your time and effort in clarifying your requirements. Your detailed explanation has provided valuable insight.

  1. Right-click on the column header ,Click Expression.
  2. Update the expression to enclose the header text in double quotes
    • Repeat this step for all column headers.
  3. Right-click on each data field in the Tablix (one column at a time).
  4. Click Expression.
  5. Use the following format to enclose the data in double quotes:
    • Replace the existing value with:
      = """" & Fields!YourColumnName.Value & """"
    • Repeat this for all data columns(except headers) in the table.


Please refer the screenshot for more understanding.

vpagayammsft_0-1742288886820.png

 

This is the exported csv output.

vpagayammsft_1-1742287014735.png

 

I hope this solution works for you.If this helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.

Thank you for being a part of the Microsoft Fabric Community Forum!



Hi @LolaVeci ,
May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or 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.

Thank you.

LolaVeci
Regular Visitor

I need an export to csv whose result is (Headers and data in quotes, and headers with names containing spaces😞

Captura de pantalla 2025-03-06 134457.png

 

Helpful resources

Announcements
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.