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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.