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
nleuck_101
Responsive Resident
Responsive Resident

Measure ignore interaction with another visual

Hello All,

 

I'm not sure if this is even possible but I figured I would reach out to the community for help. I have two measures one for total views and the other for last 2 wks % change. I have these displayed in a table. I also have a line chart that if you select the day it changes both measures. I would only want it to change the first measure total views. Is this possible? Any help would be greatly appreciated!

No date selected in line chart:

nleuck_101_0-1738073270328.png

Date selected in line chart ( I don't want my % measure to change):

nleuck_101_1-1738073316628.png

 

7 REPLIES 7
rohit1991
Super User
Super User

Yes, you can prevent the percentage change measure from being affected by the selection in the line chart while still allowing the total views measure to change.

Solution: Use ALLSELECTED or REMOVEFILTERS

Modify your % Change Measure to ignore the filter coming from the line chart:

Updated DAX Measure for % Change

% Change =
VAR PrevPeriod =
    CALCULATE(
        SUM('Table'[Views]),
        DATEADD('Table'[Date], -14, DAY),
        REMOVEFILTERS('Table'[Date])  -- Ignores date selection
    )
VAR CurrentPeriod =
    CALCULATE(
        SUM('Table'[Views]),
        REMOVEFILTERS('Table'[Date])  -- Ignores date selection
    )
RETURN
    IF(PrevPeriod = 0, BLANK(), (CurrentPeriod - PrevPeriod) / PrevPeriod)

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

@rohit1991 

One quick note, if I select a date that is more than 2wks the calculation doesn't work. It changes the calculation.
Date selected more than 2 wks ago.

nleuck_101_0-1738074902245.png

 

Hi @nleuck_101 ,

 

Great question! You can definitely set it up so that your % change measure ignores the date selection from your line chart, while your total views measure still responds to it.


Just use REMOVEFILTERS or ALL on the date column inside your % change measure. This tells Power BI to always calculate the last two weeks based on the latest available date in your data, no matter what’s selected in the line chart.

 

% Change =
VAR LastAvailableDate =
    CALCULATE(
        MAX('Table'[Date]),
        REMOVEFILTERS('Table'[Date])
    )
VAR PrevPeriod =
    CALCULATE(
        SUM('Table'[Views]),
        DATESINPERIOD('Table'[Date], LastAvailableDate, -14, DAY),
        REMOVEFILTERS('Table'[Date])
    )
VAR CurrentPeriod =
    CALCULATE(
        SUM('Table'[Views]),
        DATESINPERIOD('Table'[Date], LastAvailableDate, 0, DAY),
        REMOVEFILTERS('Table'[Date])
    )
RETURN
    IF(PrevPeriod = 0, BLANK(), (CurrentPeriod - PrevPeriod) / PrevPeriod)

 

Your Total Views measure can remain as it is, so it’ll still react to date selections on your line chart. For the % change, using REMOVEFILTERS('Table'[Date]) ensures it always gives you the change over the latest two weeks, regardless of what’s selected elsewhere.

 

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

@rohit1991 
So this happened...

nleuck_101_0-1738075665525.png

 

Anonymous
Not applicable

Hi @nleuck_101 ,

Thanks for rohit1991's and Bibiano_Geraldo's reply!

And @nleuck_101 , I'm sorry you haven't solved your problem yet, but with DAX alone it's actually very difficult for us to help you find your exact solution. Can you provide us with the data of all your data tables (with sample data instead of real data) and the relationship between each table? This will help us to understand your problem and find an accurate solution, thanks!

Best Regards,
Dino Tao

nleuck_101
Responsive Resident
Responsive Resident

@Bibiano_Geraldo 

I tried using ALL and it changed the calculation completely. I'm guessing it removed my current date filters in the measure. Below is my measure.

nleuck_101_0-1738074100373.png

 

Bibiano_Geraldo
Super User
Super User

Hi @nleuck_101 ,

This is achieved by using the ALL or REMOVEFILTERS functions in DAX, which allow you to modify how filters affect the calculation. In your case, you want the total views measure to respond to the interaction from the line chart but ensure that the last 2 weeks % change measure ignores the interaction.

Can you share your DAX measures used?

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.