Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi
So I've created a button in Powerbi to export the sliced data & email it to user. It works great. Except 1 column which has numbers (eg. 32-47) shows up as a date format in the csv, the column with Aug-22 should be same format as columns either side.
Base Excel, that column is formatted as Text, same in Powerbi. Have tried removing and adding spaces '-' & ' - '. It seems like this should be a simple fix but I am stumped. Any advice appreciated.
500| 34 - 37| Aug-22| 40 - 55| 1.7
Solved! Go to Solution.
There are a few strategies you can try to ensure your data remains in the correct format:
Prepend a Single Quote: In Power BI, you can prepend a single quote (') to your text values. This tells Excel to treat the value as text. For example, you can create a calculated column in Power BI with the following DAX formula:
NewColumn = "'" & [YourColumn]
Use Power Query to Format Data: Before exporting, you can use Power Query to ensure the column is explicitly set as text. In Power Query Editor, select the column, go to the "Transform" tab, and choose "Data Type" > "Text".
Custom Formatting in Excel: If you have control over the Excel file, you can apply a custom format to the column after exporting. Select the column, right-click, choose "Format Cells", and set the format to "Text".
Power Automate Flow: If you're using Power Automate to handle the export, you can add a step to format the column as text before creating the CSV file.
CSV Formatting: Ensure your CSV export includes double quotes around the text values. This can sometimes prevent Excel from auto-formatting the data. For example:
"500","34 - 37","Aug-22","40 - 55","1.7"
These steps should help maintain the integrity of your data when exporting from Power BI to CSV and then opening in Excel.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
There are a few strategies you can try to ensure your data remains in the correct format:
Prepend a Single Quote: In Power BI, you can prepend a single quote (') to your text values. This tells Excel to treat the value as text. For example, you can create a calculated column in Power BI with the following DAX formula:
NewColumn = "'" & [YourColumn]
Use Power Query to Format Data: Before exporting, you can use Power Query to ensure the column is explicitly set as text. In Power Query Editor, select the column, go to the "Transform" tab, and choose "Data Type" > "Text".
Custom Formatting in Excel: If you have control over the Excel file, you can apply a custom format to the column after exporting. Select the column, right-click, choose "Format Cells", and set the format to "Text".
Power Automate Flow: If you're using Power Automate to handle the export, you can add a step to format the column as text before creating the CSV file.
CSV Formatting: Ensure your CSV export includes double quotes around the text values. This can sometimes prevent Excel from auto-formatting the data. For example:
"500","34 - 37","Aug-22","40 - 55","1.7"
These steps should help maintain the integrity of your data when exporting from Power BI to CSV and then opening in Excel.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
saud968, thanks for taking the time to reply. I've opted for the ' solution for now. I've tried everything else & when I used the ' method it sorted my issue but the csv just changed another column to pull as date. I can live with the ' as a work around for my data though.
Great, happy to help please do let us know if you find a permanent fix for this.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
User | Count |
---|---|
97 | |
78 | |
77 | |
49 | |
26 |