Forum Discussion

mohita98's avatar
mohita98
Frequent Visitor
1 year ago
Solved

Power BI to Power Automate CSV Export — Number Formatting Lost in Excel

Hi community, I’m using Power BI to trigger a Power Automate flow that generates a CSV file and sends it via email. 📌 Flow Structure: Power BI button trigger Create CSV table Send email w...
  • v-csrikanth's avatar
    1 year ago

    Hi mohita98 

    Thank you for being part of the Microsoft Fabric Community.

    In addition to Deku, the proposed approach appears to effectively address your requirements.
    Please chek the below points that might resolve your issue:

    • Use a calculated column or a Power Query column, not a measure, to apply number formatting.
    • Example DAX: Formatted_Qty = FORMAT(SUM(Table[Numeric_Col]), "#,##0.000")
    • The FORMAT() function returns text, which is what you need for CSV export.
    • In Power BI, make sure you're passing this formatted text field to Power Automate instead of the raw numeric field.
    • In Power Automate, when using the "Create CSV table" action, choose the "Custom" option instead of "Automatic".

    Manually map the column like this:

    json

    CopyEdit

    {

    "Qty": "@items('YourLoop')?['Formatted_Qty']"

    }

    • This ensures the CSV contains values like "1,234.000" as literal text strings.
    • Excel will open the CSV and display the value exactly as it is, without converting it to scientific notation or removing commas.
    • Avoid passing numeric fields directly into the CSV step, as Power Automate will treat them as numbers and Excel may auto-format them incorrectly.
    • If needed, prefix the formatted string with an apostrophe (') to further force Excel to treat it as plain text.

     

    If the above information helps you, please give us a Kudos and marked the Accept as a solution.

    Best Regards,
    Community Support Team _ C Srikanth.