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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Mayast
Regular Visitor

Show specific values if there is no filter

Hi,

I want to show a bar graph but there are many values and its hard to see something.

Is it possible to defaultly filter on specific values and if the user filters on something else, to show the user's filter and not the defalut?

 

for example:

Mayast_0-1649536721230.png

show this as default

and when the user filters that 'a' = d:

not to show an empty graph

Mayast_1-1649536799388.png

 

but to show

Mayast_2-1649536824194.png

the d value

 

Thanks!

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @Mayast 

As a general solution, to apply this logic to a single measure (let's say Existing Measure), you could write a new measure like this:

Measure with default filter =
VAR DefaultFilter = { "a", "b", "c" }
VAR DefaultFilterLineage =
    TREATAS ( DefaultFilter, YourTable[a] )

// Get filters that have been applied to column A at the visual level
VAR FilterValues =
    CALCULATETABLE (
        FILTERS ( YourTable[a] ), -- FILTERS rather than VALUES
        ALLSELECTED ()
    )
VAR AllValues =
    ALL ( YourTable[a] )
VAR NoFilterApplied =
    COUNTROWS ( FilterValues ) = COUNTROWS ( AllValues )
RETURN
    IF (
        NoFilterApplied,
        CALCULATE ( [Existing Measure], KEEPFILTERS ( DefaultFilterLineage ) ),
        [Existing Measure]
    )

If you need to apply this to multiple measures, you could turn it into a Calculation Group.

 

You could likely use a similar measure as a visual-level filter if you know the column being filtered is on the axis.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hi @Mayast 

As a general solution, to apply this logic to a single measure (let's say Existing Measure), you could write a new measure like this:

Measure with default filter =
VAR DefaultFilter = { "a", "b", "c" }
VAR DefaultFilterLineage =
    TREATAS ( DefaultFilter, YourTable[a] )

// Get filters that have been applied to column A at the visual level
VAR FilterValues =
    CALCULATETABLE (
        FILTERS ( YourTable[a] ), -- FILTERS rather than VALUES
        ALLSELECTED ()
    )
VAR AllValues =
    ALL ( YourTable[a] )
VAR NoFilterApplied =
    COUNTROWS ( FilterValues ) = COUNTROWS ( AllValues )
RETURN
    IF (
        NoFilterApplied,
        CALCULATE ( [Existing Measure], KEEPFILTERS ( DefaultFilterLineage ) ),
        [Existing Measure]
    )

If you need to apply this to multiple measures, you could turn it into a Calculation Group.

 

You could likely use a similar measure as a visual-level filter if you know the column being filtered is on the axis.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Thanks!!!

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors