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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Sid777
Frequent Visitor

dax function

Good orders = CALCULATE([Order Count],FILTER(table_orders,[Actual order value]>AVERAGE(table_orders[Bill_amt])))
 
where [Actual order value] =
Actual order value = CALCULATE(SUM(table_orders[Bill_amt]),table_orders[DeliveryStatus]<>"Cancelled").

Here can some tell me that the measure  [Actual order value] used in Good orders, is an aggregrated value?

If yes, then the Good orders should ideally count all row because aggregated values is always bigger then the average.
5 REPLIES 5
Sid777
Frequent Visitor

Sid777_0-1703313489071.png

Sir, these are the three measures
1)Actual
order value = CALCULATE(SUM(table_orders[Bill_amt]),table_orders[DeliveryStatus]<>"Cancelled")
2)Average amount of order = AVERAGE(table_orders[Bill_amt])
3)Good orders = CALCULATE([Order Count],FILTER(table_orders,[Actual order value]>AVERAGE(table_orders[Bill_amt])))
 
Sir, the result for  Good orders is coming out to be 6
My doubt is that in Good orders = CALCULATE([Order Count],FILTER(table_orders,[Actual order value]>AVERAGE(table_orders[Bill_amt]))), isn't [Actual order value] an aggregated value, which is same for all rows.
 
Regards

 

It is not an aggregated value because the table you have provided is table_ordes in the Good Orders measure.  So the masure is being evaluated for each row.  If you want to receive any further help, share some data to work with, explain the question and show the expected result. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Sid777_0-1703316713873.png

Sir, in the similar context when I use the measure [Average amount of order] inside the FILTER function 

Good order 1 = CALCULATE([Order Count],FILTER(table_orders,[Actual order value]>[Average amount of order])), you can see in the screen shot the result is coming "blank". Could you please advice why the result is coming blank .
 
Good orders = CALCULATE([Order Count],FILTER(table_orders,[Actual order value]>AVERAGE(table_orders[Bill_amt])))
 
Is there any difference in the working of Good orders and Good orders1

I cannot help you by simple looking at a screenshot.  Prepare a simple Table and show the expected result for that table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

Share some data, explain the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.