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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
agarwal137
Frequent Visitor

Pass a table to calculate with all applied external/internal filters but except on one column

Hi!
Can anyone please help me crack this -

Is there any way I can return a table with all the explicit and implicit filters applied, within calculate function, but remove filter, if any, on one column?

I tried with ALLSELECTED and it gives correct result by month until I do not pull any other dimension/column. I understand that All selected is keeping All External Filter context but then taking off any applied internal filter. I hope I was able to make the question & issue clear. Here is the formula and below screenshot where the DAX calculates correct at Month level but incorrect at the Region level. Any suggestion is much appreciated.

FY20SalesDelta =
var CurrentPeriodIndex = LOOKUPVALUE(LookUpCustomCalendar[Index],LookUpCustomCalendar[Reporting Period],MAX(FY20MonthlyData[Period]))
var PriorPeriodIndex = CurrentPeriodIndex -1
var PriorPeriod = LOOKUPVALUE(LookUpCustomCalendar[Reporting Period],LookUpCustomCalendar[Index],PriorPeriodIndex)

Return
[+FY20Sales] -
CALCULATE([+FY20Sales],
FILTER(
ALLSELECTED(FY20MonthlyData),
FY20MonthlyData[Period]=PriorPeriod)
)
 
 
 

Screenshot 2021-02-26 035637.jpg

2 REPLIES 2
lbendlin
Super User
Super User

Consider using KEEPFILTERS/REMOVEFILTERS as needed.

Hi Ibendlin. Thank you but unfortunately I could not figure it out with keepfilters/removefilters. If you could please create it for me, I'd very much appreciate your help.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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