Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mmace1
Impactful Individual
Impactful Individual

Report Builder - how to hide columns, *but* have them still show up in the Excel export?

In Power BI Report Builder, I want some columns to be hidden, but have them show up when exporting to Excel.

 

So far I've tried:

  • Right Click the column > Visibility
  • Show or hide based on an expression
  • =ucase(Globals!RenderFormat.Name) <> “IMAGE”

And that hides the columns from the report. But then when exported to Excel - those columns stay hidden / aren't exported, when I do want them to appear in the export.

1 ACCEPTED SOLUTION

Hey @mmace1 , this is odd.

 

This is a very simple table without groups (just columns):

image.png

The little text box on the right contains this expression (consider it a sanity check):

= Globals.RenderFormat.Name

As I want to hide the column Color Name if I do not export to Excel, I select the column

image.png

I change the visibility of the column

image.png

The option

image.png

The Expression

=iif(Globals.RenderFormat.Name = "EXCELOPENXML", false, true)

Maybe this is important

image.png

This how the report looks inside my workspace:

image.png

And this is how the Excel file looks after exporting (of course the screenshots show just a fraction of rows)

image.png

 

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

5 REPLIES 5
TomMartens
Super User
Super User

Hey @mmace1 ,

 

I'm wondering if this expression will change anything:

=IIF(UCase(Globals!RenderFormat.Name) <> "IMAGE",true,false)

Hopefully, this provides what you are looking for.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
mmace1
Impactful Individual
Impactful Individual

@TomMartens Same behavior - that formula also hides the columns, but those hidden columns still don't show up when exporting to Excel.  

Hey @mmace1 , this is odd.

 

This is a very simple table without groups (just columns):

image.png

The little text box on the right contains this expression (consider it a sanity check):

= Globals.RenderFormat.Name

As I want to hide the column Color Name if I do not export to Excel, I select the column

image.png

I change the visibility of the column

image.png

The option

image.png

The Expression

=iif(Globals.RenderFormat.Name = "EXCELOPENXML", false, true)

Maybe this is important

image.png

This how the report looks inside my workspace:

image.png

And this is how the Excel file looks after exporting (of course the screenshots show just a fraction of rows)

image.png

 

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
mmace1
Impactful Individual
Impactful Individual

@TomMartens I don't know what in your instructions is different from what I was doing, but it works now - thanks!

I'm apparently at the "Instructor: Now click the start menu" "User: It doesn't do anything when I click it" stage of report builder. 

Ha, I exactly know what you are talking about.

 

Nevertheless, it works now 👍



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.