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
thomasreick
Resolver I
Resolver I

Visbility of Visuals depending on Measure built with COUNTROWS(tablename)

Hello Community,

how is it possible to show or hide a visual depending on the outcome of a measure which is either 0 or >0? 0 means "hide" the visual whilst any number >0 means show the visual. Base for this visual is a list of errors, so when there is no error the list should not be visible at all ( To me this should be a native functionality within PBI, already sometimes requested here)

 

I have concerns on approaches fiddling with conditional formatting, which is "only" a workaround.

The bookmark-approach is not the way to go, because the condition is in the data.

 

Is that a point to suggest for further Development towards MS?

 

Appreciating any suggestions.

 

thx&brgds

Thomas

1 ACCEPTED SOLUTION

Hello  v-chenwuz-msft,

thank you for your reply.

 

If this is actually the only way to hide/unhide not needed information than I have to accept this.

But to be honest: This is not my favourite solution. I think of a more generic approach, like it is possible with VBA to set visibility status of controls on a form depending on conditions.

 

The recommended approach is doing the job but imagine the following:

  • You have a dashboard-page showing numbers of errors of different kind from a what-ever-process.
  • There are days where all the errors are 0, so no errors within the process.
    • In that cases the results showed on the dashboard is enough.
    • Presenting an empty has no added value. but might cause confusion.
  • Only when parts of the errors needs to be checked manually (i.e #Errors >0) then a detail page or a detail  error-table should be visible.

I have voted for this functionality on an existing request today.

 

Thank you I will mark your answer as Accepted Solution
 
 

View solution in original post

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @thomasreick ,

 

You mean hide the visual when the measure not >0?

There is no way to hide this table directly, but we can achieve this by overriding it. The hiding is then achieved by controlling whether the background color is transparent or not.

 

First, create a shape and turn off fill in the format of this visual and set background with fx.

vchenwuzmsft_0-1652082594814.png

Then some measure like this:

color = IF([Measure]>0,"#ff000","white")
 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

 

Hello  v-chenwuz-msft,

thank you for your reply.

 

If this is actually the only way to hide/unhide not needed information than I have to accept this.

But to be honest: This is not my favourite solution. I think of a more generic approach, like it is possible with VBA to set visibility status of controls on a form depending on conditions.

 

The recommended approach is doing the job but imagine the following:

  • You have a dashboard-page showing numbers of errors of different kind from a what-ever-process.
  • There are days where all the errors are 0, so no errors within the process.
    • In that cases the results showed on the dashboard is enough.
    • Presenting an empty has no added value. but might cause confusion.
  • Only when parts of the errors needs to be checked manually (i.e #Errors >0) then a detail page or a detail  error-table should be visible.

I have voted for this functionality on an existing request today.

 

Thank you I will mark your answer as Accepted Solution
 
 

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.