Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
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
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:
Any idea why this is happening?
Thank you
@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
@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
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"
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 39 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 34 | |
| 32 | |
| 29 |