Forum Discussion

scottkg's avatar
scottkg
Frequent Visitor
3 years ago

Paginated Report export to CSV prepends dataset table name to each column

I'm using a paginated report to export a flat csv file of a dataset table.

 

If I export the paginated table to excel- the column headers are as expected.

 

However, if I export the paginated table to csv, then the the dataset table name is pre-pended to each column name.

 

So if the field is "Total Sales" - in excel the column header is "Total Sales".

 

In the csv export, it is "dataset_table_name__Total_20_Sales".

 

The behavior is the same for a manual export directly from the report in pbi service - or when done via power automate (which is really what I'm trying to do).

 

Any suggestions?

11 Replies

  • I'm using a paginated report to export a flat csv file of a dataset table.

    That sounds overly complex. Have you considered running your DAX query in Power Automate, PowerShell, or any other automation tool ?

    • scottkg's avatar
      scottkg
      Frequent Visitor

      Well- the simple scenario of manually exporting a paginated report to csv isn't complex- and I'm asking why it prepends the dataset name to each column (and how to avoid it).

      • FordyOwl's avatar
        FordyOwl
        New Member

        Hi, I have the exact same issue been driving me wild trying to find unsuccessful workarounds. Did you ever find a resolution?

  • AlLangstaff's avatar
    AlLangstaff
    Frequent Visitor

    I've been trying to solve the same problem, I've not found a way round it specifically to display the column titles exactly as you want, but you can rename the cells in the table and call them whatever you want, just right click on the box with the actual repeating data cell and in properties call it want you want. Only Limitation is you can't have spaces.

    • scottkg's avatar
      scottkg
      Frequent Visitor

      I'll probably just resort to exporting as excel - let the downstream users use that instead of a csv.  I'm automating the process with a daily export, so need to keep it simple.

      • AlLangstaff's avatar
        AlLangstaff
        Frequent Visitor

        Other Option, which I've done in a couple of cases where I needed change the headers to was to use PowerAutomate to run the report, Parse the JSON and rebuild the CSV with the correct headers in PowerAutomate. Or just replace the headers. There's probably about 5 different ways to achieve it in a flow.

  • The header are correctly rendered in export in Excel, but in CSV, ReportBuilder renders instead the name of the TextZone.

    To modify it, use report builder in design mode, click inside the TextZone of your table, look at the property pane and update the "Name"

    • Mike250Amused's avatar
      Mike250Amused
      Icon for Advocate I rankAdvocate I

      Unfortunately this doesn't work. You cannot enter spaces or special characters in the Name proerty. 

       

  • Hi, I was able to resolve this issue with the following steps:

    • Click on each field text box in your report page
    • Then change the property 'DataElementName' to the desired Name (Name can't have spaces)
    • Test by exporting as CSV

    Cheers.