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