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! Request now

Reply
amorris1124
New Member

Dax based on multiple averages not filtering

I have dax formula that will create an indicator flag (a 1 or a 0) based on how well three different metrics perform against the overall average of each individual Metric. So basically, Sales for a line vs the average of all, sell thru per line vs the average of all sell thru, and the same for promotional rate vs the average.  My dax to flag the lines works well, but I want the ability to filter the metric I created, and this does not work at the row level which is what I need.  Any help with the formula or why this will or wont work is greatly appreciated.

 
Above Average All =
var avesls = calculate(AVERAGEx(Store_Dim,[Net Sales TY]),allselected(Store_Dim))
var avepromo = calculate(averagex(Store_Dim,[Ttl Promo MD % TY]),ALLSELECTED(Store_Dim))
var avesellthru = calculate(AVERAGEX('Store_Dim',[Sell thru store % TY]),allselected(Store_Dim))
var aveall = avesls<[Net Sales TY] && avesellthru<[Sell thru store % TY] && avepromo>[Ttl Promo MD % TY]
return
switch(aveall,True,1,False,0)
 
Table looks like below
Store SnumAbove Average AllNet Sales TYSell Thru Store % TYTTL Promo MD TY
123450100080%5%
67890

0

50080%5%
135791200090%1%
1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @amorris1124 

 

What does your expected result should be like? Do you want to use the [Above Average All] measure to filter the table visual?

 

If you want to filter the table visual via a measure, you can drag it to the visual-level filter pane and set the filter rule there. Then click Apply filter to apply it. 

vjingzhang_0-1649066528187.png

 

If this is not what you want, can you show an example of the expected result based on some sample data? This can help us understand it better and provide a more accurate solution. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

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