Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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:
show this as default
and when the user filters that 'a' = d:
not to show an empty graph
but to show
the d value
Thanks!
Solved! Go to Solution.
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
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
Thanks!!!