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
Anonymous
Not applicable

Hide Card when value is 0?

Hi,

I've 3 cards shown below, I want to hide the cards when the value is "0". Is it possible? My User should not see the "0" resulted Cards. Pls help me on this. Thanks!

MuraliPrasathS_0-1612268389520.png

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Anonymous 

Sorry, this isn't possible.

However you can set up Conditional Formatting rules so that the value and category turn white (or the same colour as your background) effectivelymaking the card disappear.

Download this sample PBIX to see an example

Note that in that PBIX I've turned on the border on the card, just so you can find it.  Turn it off to make the card 'invisible'.

cffx.png

cffx.png

 

Before Conditional Formatting

b4cf.png

 

After Conditional Formatting

aftcf.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

6 REPLIES 6
Greg_Deckler
Super User
Super User

@Anonymous Add something like this to your measure

 

Measure
 VAR = __Value = <some calculation>
RETURN
  IF(__Value = 0,BLANK(),__Value)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi,

It gives me Blank and not hiding the card. (Refer Image Below).

MuraliPrasathS_0-1612269910320.png

 

PhilipTreacy
Super User
Super User

Hi @Anonymous 

Sorry, this isn't possible.

However you can set up Conditional Formatting rules so that the value and category turn white (or the same colour as your background) effectivelymaking the card disappear.

Download this sample PBIX to see an example

Note that in that PBIX I've turned on the border on the card, just so you can find it.  Turn it off to make the card 'invisible'.

cffx.png

cffx.png

 

Before Conditional Formatting

b4cf.png

 

After Conditional Formatting

aftcf.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi,

I did the same as you mentioned. You mean there is no other way?  

@Anonymous 

Correct.  You can't remove a visual based on a value.  Best you can do is hide the value and data label as I've shown.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Thanks, my only concern here is I can't place one top of another for better UI looks. Always each Card occupies dedicated space.  Anyway if there is no way then. I can accept your solution. 

Mr.PowerBI Tool should include this feature ASAP. 😀

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.