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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
totamum
Frequent Visitor

Only display results when filter is selected

I have a card which shows page views for each user and another card which shows whether the page views are above or below average.  I only want this card (Above/Below Average) to display when a user is selected.  The default is when no user is selected, the total sum of page views displays and then it says Above Average, the issue with that is that the sum of page views is always going to be larger than the average so therefore it will always show Above Average. Is there any way to have cards only display when a value is selected?

totamum_3-1737379232631.pngtotamum_4-1737379251651.png

 

8 REPLIES 8
Bibiano_Geraldo
Super User
Super User

Hi @totamum ,
If you need to ensure that exactly one user is selected, you can use HASONEVALUE function:

AboveBelowAvg =
IF(
    HASONEVALUE(Users[UserID]),  // Check if exactly one user is selected
    [Your measure used to calculate bellow and above],
    BLANK()
)

 

Or you can check if the UserID column is being filtered ( with one or multiple user's):

AboveBelowAvg =
IF(
    ISFILTERED(Users[UserID]),  // Check if there's any filter on the UserID column
    [Your measure used to calculate bellow and above],
    BLANK()   // Return blank when no filter is applied (i.e. no user is selected)
)

Thanks no I'd just like to not have a value display when nothing is selected.  I tried the second one but it says Blank even when users are selected.

 

totamum_1-1739464884391.png

 

I did try the solution you provided but it didn't work.  This one did except I'd rather it be null than say blank so I've saved this measure.

 

AboveBelowAverage =

VAR SelectedUser = SELECTEDVALUE('PVs Downloads Time Spent'[User Name])

VAR UserPageViews = SUM('PVs Downloads Time Spent'[Page Views])

VAR AvgPageViews = AVERAGE('PVs Downloads Time Spent'[Page Views])

RETURN

IF(

ISBLANK(SelectedUser),

BLANK(),

IF(UserPageViews > AvgPageViews, "Above Average", "Below Average"))

 

Hi @totamum 

Please, for acurate solution, consider to share the measures used in both scenarios, for page views and for above and bellow.

girishthimmaiah
Resolver I
Resolver I

Solution 1: DAX for Visibility Management

To limit the card being shown, you will need to create a measure that returns a value only when a user is selected, otherwise a blank value is returned.

Step 1: To Create a Measure

DAX

Edit Copy
AboveBelowAverage =

VAR SelectedUser = SELECTEDVALUE(‘Users’[User])

VAR UserPageViews = SUM(‘PageViews’[Views])

VAR AvgPageViews = AVERAGE(‘PageViews’[Views])

RETURN

IF(

ISBLANK(SelectedUser),

BLANK(), – Hide when no user is selected

IF(UserPageViews > AvgPageViews, “Above Average”, “Below Average”)

)

Step 2: Make This Card Measure Active

Using Power Bi Card visual’s field function, take out the current field and replace it with this measure.

Above/Below Average card, will usually not display when no user is selected as Power BI card visuals automatically hide blank values.

Solution 2: Apply a Visual Level Filter
Another option is applying a visual level filter to the card.

Click the Above/Below Average card.

Go to Filters pane and on filter type select ‘Users’[User] field.

Filter to is not blank.

This ensures that the card only shows up when a user is selected.

Thank you, solution 1 worked except it actually says Blank and I'd rather it not have anything, how can it literally be blank?

 

totamum_3-1739465688155.png

Once user is selected

totamum_4-1739465704477.png

 

FarhanJeelani
Super User
Super User

Hi @totamum ,

try this:

Show Above/Below Average =
IF (
ISFILTERED ( Users[User] ), -- Checks if a user is selected
[Above Below Average Measure], -- Displays your existing measure when a user is selected
BLANK() -- Returns blank when no user is selected
)

 

Please mark this as solution if it helps you. Appreciate Kudos.

It says Blank and doesn't change when a user is selected 

totamum_0-1739464794807.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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