Home / Power BI / Show a Custom Message When a Power BI Slicer Is Deselected

Show a Custom Message When a Power BI Slicer Is Deselected

Social Shares

TL;DR: A card visual shows an unhelpful “(blank)” when its slicer is deselected, but a simple DAX measure using HASONEVALUE fixes this instantly. Wrap your existing measure in an IF condition to return either BLANK() for a clean empty card, or a custom string like “Please Select Year” to guide the user, replacing the default blank state entirely.

When a card visual is connected to a slicer, deselecting the slicer often causes the card to display an ugly, unexplained “(blank)” instead of a meaningful value. This creates a confusing experience for report viewers who won’t understand why the number disappeared. Fortunately, a simple DAX measure can replace that blank with either a clean empty card or a custom message like “Please Select Year.”

The Problem
With a slicer and a card visual connected to the same table, selecting a value from the slicer correctly updates the card. But deselecting the slicer (so no value is selected) causes the card to show “(blank)” instead of hiding gracefully or guiding the user on what to do next.

Solution 1: Show a Blank Card Instead of “(blank)”

Create the following measure and use it in your card visual instead of the raw column:

Card Value =
IF(
    HASONEVALUE('Table'[Year]),
    SUM('Table'[Sales]),
    BLANK()
)

HASONEVALUE() checks whether exactly one value is currently selected in the slicer. If true, it returns the sum of Sales for that selection. If no value (or more than one) is selected, it returns BLANK(), which Power BI renders as a genuinely empty card instead of the text “(blank).”

Small DAX fixes like this add up across a full report. Our Power BI experts can help polish your entire dashboard. Explore our Data Analytics services →

So, whenever the slicer is deselected, it should show me the blank card or any static string like “Please Select Value.”

Solution 2: Show a Custom Message Instead

If you’d rather guide the user with a message, replace BLANK() with a text string:

Card Value with Message =
IF(
    HASONEVALUE('Table'[Year]),
    SUM('Table'[Sales]),
    "Please Select Year"
)

Stuck on a trickier DAX problem? Get in touch with our team →

Drag this measure into the card visual instead of the original column. Now, whenever the slicer is deselected, the card displays “Please Select Year” instead of a confusing blank state.

So, the result of this solution is:

Here we are getting a blank card as we want.

And if we want a static text then create a new measure as shown below and drag and drop this measure into the card visual

So, the result of this solution is:

And now we can see a static string in the card “Please Select Year”.

Conclusion

This small DAX pattern, HASONEVALUE() paired with an IF() statement, gives you full control over how a card visual behaves when its slicer isn’t actively filtered, resulting in a cleaner, more professional dashboard experience for end users.

Frequently Asked Questions

Common questions about hiding “(blank)” on Power BI cards using HASONEVALUE and related DAX functions.

Wrap your measure in HASONEVALUE and return BLANK() when no slicer value is selected. For example: IF(HASONEVALUE(Table[Column]), SUM(Table[Value]), BLANK()). This makes the card visual genuinely empty instead of displaying the text “(blank).”
HASONEVALUE checks whether exactly one distinct value is currently selected, while ISFILTERED checks whether any filter is applied at all, even multiple values. For a single-select slicer feeding a card, HASONEVALUE is usually the right choice.
This happens because “Select All” in a disconnected slicer often deselects everything internally, but the card measure doesn’t detect that as an empty state. Using ISFILTERED combined with COUNTROWS(VALUES()) to check the actual selection count usually resolves this.
Yes. SELECTEDVALUE(Table[Column], "Please Select Value") works similarly, returning the second argument as a fallback text when no single value is selected. It’s a shorter syntax for the same basic logic as HASONEVALUE combined with IF.
This usually means the measure’s logic or filter context isn’t matching your data model correctly, often due to relationships not propagating as expected. Double-check that the slicer field and the measure’s table are properly related in the model.
Yes, but you’ll need to check HASONEVALUE for each relevant column separately, or combine them with AND logic, since the card needs all required slicers to have a single value selected before showing a result.
No, BLANK() only affects the specific visual using that measure. Other charts, tables, or cards on the same page continue to behave according to their own measures and filter context.

From simple UX fixes to full report builds, we help teams create dashboards people actually trust. See how we can help →

Author By

Kamal Sharma

Kamal brings over 20 years of experience in data analytics and business intelligence. He has led the design and implementation of analytics solutions across operations, financial reporting, and performance improvement initiatives. With a background in business statistics and Six Sigma, his work focuses on applying data in a structured and practical way to solve real business challenges.

Author By

Kamal Sharma

Kamal Sharma

Kamal brings over 20 years of experience in data analytics and business intelligence. He has led the design and implementation of analytics solutions across operations, financial reporting, and performance improvement initiatives. With a background in business statistics and Six Sigma, his work focuses on applying data in a structured and practical way to solve real business challenges.

Decision-Ready Analytics

Turn your OEE dashboard into a decision system.

Book a 30-minute working session with our manufacturing analytics team.
Translate »