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! Learn more

Reply
Anonymous
Not applicable

Add amd subtract from a measure based on slicer selectuon

Hi Experts

I have a measure which works out the organic growth YTD works fine. What I need to do is based on the selected criteria on two slicers
Slicer 1. Has Year Values
Slicer 2. Has Month Vakes

So when the user select month April and year 2018 subtract 0.01% from measure and when user select Sept 2018 add 0.01% to current measure that's it.
1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,




So when the user select month April and year 2018 subtract 0.01% from measure and when user select Sept 2018 add 0.01% to current measure that's it.

For your scenario, it seems that we could add the if function in the measure which works out the organic growth YTD to determine if the slicers are filtered.

 

You could refer to the formula below.

 

Add amd subtract from a measure based on slicer selectuon =
VAR selectyear =
    SELECTEDVALUE ( Sheet13[Date].[Year] )
VAR selectmonth =
    SELECTEDVALUE ( Sheet13[Date].[Month] )
RETURN
    IF (
        selectyear = 2018
            && selectmonth = "April",
        [Measure] - 0.01,
        IF (
            selectyear = 2018
                && selectmonth = "September",
            [Measure] + 0.01,
            [Measure]
        )
    )

If you still need help, please share your data sample and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,




So when the user select month April and year 2018 subtract 0.01% from measure and when user select Sept 2018 add 0.01% to current measure that's it.

For your scenario, it seems that we could add the if function in the measure which works out the organic growth YTD to determine if the slicers are filtered.

 

You could refer to the formula below.

 

Add amd subtract from a measure based on slicer selectuon =
VAR selectyear =
    SELECTEDVALUE ( Sheet13[Date].[Year] )
VAR selectmonth =
    SELECTEDVALUE ( Sheet13[Date].[Month] )
RETURN
    IF (
        selectyear = 2018
            && selectmonth = "April",
        [Measure] - 0.01,
        IF (
            selectyear = 2018
                && selectmonth = "September",
            [Measure] + 0.01,
            [Measure]
        )
    )

If you still need help, please share your data sample and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Many Thanks Cherry, excellent feedback as always

Helpful resources

Announcements
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!

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