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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Theodore88
Regular Visitor

cannot apply a slicer to a measure that uses calculate() with a filter

Hi

 

I am wondering if anyone can help.

I managed to create a measure that calculates the total contracts exposure using DAX formula calculate with a filter.

Even though the formula works there is no way to apply addtional filters to the measure either with a slicer or in the visual panel.(the filter parameter seems to overwrite other filters)

The below is the function I am using if needed, is there any work around to this?

 

Exposure = calculate(
sum(
Components[NetLJ]
)
,FILTER(ALL (Components),Components[DateLJ]<=max(Components[DateLJ]))

)

 

 

1 ACCEPTED SOLUTION
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Theodore88

 

In your forumla, since you apply ALL() function in your filters, it will remove all filters. That's the reason your additional filter/slicer doesn't work. Please replace your ALL() function with ALLSELECTED(). See my sample below:

 

Exposure = CALCULATE(SUM(Table7[Value]),FILTER(ALLSELECTED(Table7),Table7[Seller]="Seller1"))

66.PNG

 

 

677.PNG

View solution in original post

1 REPLY 1
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Theodore88

 

In your forumla, since you apply ALL() function in your filters, it will remove all filters. That's the reason your additional filter/slicer doesn't work. Please replace your ALL() function with ALLSELECTED(). See my sample below:

 

Exposure = CALCULATE(SUM(Table7[Value]),FILTER(ALLSELECTED(Table7),Table7[Seller]="Seller1"))

66.PNG

 

 

677.PNG

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors