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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
guilrosr
New Member

CALCULATE with FILTER not working

Hi all, 

I'm trying to add a FILTER to my CALCULATE formula, but it does not return any values.

The filter bases its parameters on the result of the formula: 

 

Overall Average Price = CALCULATE[Average Retail Price]ALL'Product Categories Lookup'))

 

When running this formula by itself, it gives the expected result: $714.44

 

guilrosr_0-1715587819468.png


When testing the formula with the result as a "fixed number" in the calculate option, it works, but when using the Overall Average Price formula, there are no results:

guilrosr_1-1715588087999.png   

guilrosr_5-1715588318492.png

 

guilrosr_4-1715588297019.png

 


Any idea why this is happening?

Thank you

4 REPLIES 4
Arul
Super User
Super User

@guilrosr ,
Create a variable for average price and use that in calculate filter instead of referring the mesure directly, 

High Ticket_Orders = 
VAR _Overallaverageprice = AVERAGE('Product'[List Price])
VAR _result = CALCULATE(
    [Total_Order],
    FILTER('Product',
    'Product'[List Price]>_Overallaverageprice))
RETURN _result

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


amitchandak
Super User
Super User

@guilrosr , Change filter like in non working case

Filter(values('Product Lookup'[Category]), max('Product Lookup'[Product Price] > [Overall Average Price]))

 

if Product Price is measure remove max

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

It still returns no values.
My question is why, when adding the value itself (714.44 - which is the result of the formula Overall Average Price ), the filter works, but not with the formula.

 

Modify your Overall Average Price  to remove all filters from "Product Lookup" table instead of "Product Categories Lookup"

 

Overall Average Price =
CALCULATE(
    [Average Retail Price],
    ALL(
        'Product Lookup'
    )
)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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