Forum Discussion

eaj's avatar
eaj
Helper I
2 years ago
Solved

Remove square Brackets from column headers DAX Query

I am currently streamlining a project in which we export data in CSV format to an external system. In the past, I have successfully created a table in Power BI with the same layout as I desire for my...
  • Anonymous's avatar
    Anonymous
    2 years ago

     Hi eaj ,

    Hmm. The square brackets are kinda needed as they separate the column name from the table name. However

    You can try it:

    $Results |export-csv -Path $ExportPath -NoTypeInformation
    (Get-Content -Path $ExportPath ) -replace '[\[\]]' |Set-Content -Path $ExportPath

    This allows you to not include square brackets in the production csv file

    The following post will help you:

    Solved: Removing square brackets from column headers DAX q... - Microsoft Fabric Community

    Best Regards,

    Xianda Tang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.