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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
madamadakun
Frequent Visitor

Creating a Measure to remove effects of a slicer

Hi all,

 

I have been stuck at this for hours and wonder if I could get some help. Is there a way to get a value based on "unfilter" a slicer? Quick example is this.

 

ColourTypeValue
BlueCars1
BlueBlack2
YellowBlack3
YellowCars4
GreenTrucks5
GreenTrucks6

 

Let's say I have a slicer, "Colour", and "blue" is selected. I have a Matrix table with "type", and "value". Based on the slicer, only blue shows.  Can I create a measure for this table that show's the value of yellow as well? What i'm trying to do is create a value, unfilter and ignore the effects of the slicer, then select colour as yellow.

 

I heard calculate works:

YellowOnlyValue = CALCULATE(sum(Table1[Value]),filter(Table1,Table1[Value]="Yellow"))

 

Any help is appreciated.

 

The desire output is as follows.

 

TypeSlicer ValueYellowOnly Value
Cars13
Matrix24
1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @madamadakun,

 

Based on my test, you should be able to use the formula below to create a new measure to calculate the Yellow Only Value in your scenario. Smiley Happy

Yellow Only Value = 
VAR currentType =
    FIRSTNONBLANK ( Table1[Type], 1 )
RETURN
    CALCULATE (
        SUM ( Table1[Value] ),
        FILTER (
            ALL ( Table1 ),
            Table1[Colour] = "Yellow"
                && Table1[Type] <> currentType
        )
    )

r3.PNG

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @madamadakun,

 

Based on my test, you should be able to use the formula below to create a new measure to calculate the Yellow Only Value in your scenario. Smiley Happy

Yellow Only Value = 
VAR currentType =
    FIRSTNONBLANK ( Table1[Type], 1 )
RETURN
    CALCULATE (
        SUM ( Table1[Value] ),
        FILTER (
            ALL ( Table1 ),
            Table1[Colour] = "Yellow"
                && Table1[Type] <> currentType
        )
    )

r3.PNG

Regards

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors
Top Kudoed Authors