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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Measure that is not affected by Filter Slicers BUT that has a filter

I am trying to find the right way to create a measure that is not affected by the filter slicers that are on the PBi page, but that is filtered by the year of the data.

 

The measure I want to creat is the sum of a whole column, filtered by all the values that are from 2021 and for now i have the following:

 

Total =
CALCULATE(
    SUM('Table'[Column)]),
    ALL('Table')
)
Which effectively makes sure that this measure is not affected by any filter slicers on the page that I want to use it.
 
The thing is that I want to make sure that this measure only takes the values of this year (2021) and therefore the logical thing would be to put ALL(Table[Date]) but there is a slight problem. One of the filter slicers of the page is Table[Date] by Month, or rather, one of the slicers helps show the information monthly, therefore when i use ALL(Table[Date]) the measure is affected by that filter when I do not want it to be.
 
I have tried with various different DAX commands but I am not able to figure it out, if anyone could help me I would greatly appreciate it!
 
Thank you!
 
3 REPLIES 3
wdx223_Daniel
Super User
Super User

Total =
CALCULATE(
    SUM('Table'[Column)]),
    ALL('Table'),Year(table[Date])=2021
)

Hi There, 

 

I have tried something similar though I am wanting to find the average of everything without the filter effecting the number but having some issues. Below is the code

 

P&TAverage = CALCULATE(Average('Data Set - Leave Liability'[Total Days]),All('Data Set - Leave Liability'[Branch]),'Data Set - Leave Liability'[Branch] = "Policy & Trade")
Anonymous
Not applicable

I ended up doing something very similar to this, but for some reason my date column did not want to filter by year, so i simply made a column "Year" in my table. Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors