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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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