Forum Discussion

minhuan's avatar
minhuan
Regular Visitor
1 year ago
Solved

Powerbi Service Export Issue--Export Excel

Hi

 

I create a measure, _x=switch(TRUE(),ISBLANK([measure]),BLANK(),[measure]<10,[measure]), when data <10, it will show '<10' in the table. But I find that when I export data from service in 'Excel' format, it will show real data instead of '<10'. Why?

 

Is this a feature limit? where can I find this explanation? And I want to know how to disable Excel Export in specific report?

 

Thanks!

 

 

  • minhuan Workaround: Preserve Display Formatting in Export

    To ensure that Excel shows "<10" instead of the actual number, you can modify your measure to return text instead of numeric values:

     

    _x = SWITCH( TRUE(), ISBLANK([measure]), BLANK(), [measure] < 10, "<10", FORMAT([measure], "General") )

     

    This forces Power BI to treat the output as text, which will be preserved during export. However, note that this may limit sorting or aggregation in visuals.

9 Replies

  • Hi. First, it doesn't look like the measure does what you are explaining. So it's kind of tricky. Anyway, make sure you click export current layout when trying to export data. Other options won't show exactly what you are seeing.

    For preventing the export to excel for a single report you can do what SamWiseOwl is showing. I you want to prevent it for the whole organization you can change a setting at Admin Portal - Tenant Settings.

    I hope that helps

  • Hi minhuan 
    To turn off excel export change this setting:

     

     

    For the second issue could you recreate it in this file:

    If you want the literal value of < 10 then return that:
    _x=switch(TRUE(),ISBLANK([measure]),BLANK(),[measure]<10,"<10")

  • minhuan's avatar
    minhuan
    Regular Visitor

    Thanks a lot, When I use export current layout, it still doesn't work. 

    I can't disable all export, so I think I need to use admin portal to control export type. I think this is a feature bug.

    • v-sshirivolu's avatar
      v-sshirivolu
      Community Support

      Hi minhuan ,

      This isn’t a bug, even with Export current layout, Power BI exports the underlying model values before formatting. That’s why <10> is replaced by the original number.

      If you want <10> to show up in the export, make the measure return text in DAX, such as:

      _x =
      SWITCH(
          TRUE(),
          ISBLANK([measure]), BLANK(),
          [measure] < 10, "<10",
          FORMAT([measure], "0")
      )

      This makes the value text so the export matches the visual. If you need numeric sorting, create a second numeric column or measure and use Sort By Column.

      To restrict export types, go to Admin Portal - Tenant settings - Export and sharing settings and limit formats (like CSV) for certain security groups.

      • v-sshirivolu's avatar
        v-sshirivolu
        Community Support

        Hi minhuan ,

        I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.

         

  • Shahid12523's avatar
    Shahid12523
    Community Champion

    Excel export shows raw values, not formatted <10 → this is a Power BI limitation (formatting isn’t preserved).

    To disable export for a report:

    Report settings → Export data = Off, or

    Admin portal → Tenant settings → Export data (scope to users/workspaces).

  • minhuan Workaround: Preserve Display Formatting in Export

    To ensure that Excel shows "<10" instead of the actual number, you can modify your measure to return text instead of numeric values:

     

    _x = SWITCH( TRUE(), ISBLANK([measure]), BLANK(), [measure] < 10, "<10", FORMAT([measure], "General") )

     

    This forces Power BI to treat the output as text, which will be preserved during export. However, note that this may limit sorting or aggregation in visuals.