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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jteixeira
Regular Visitor

DAX Calculation Question

Hi Guys! 
I am building a measure, actually a very basic and simple measure but the data is not showing the expected results when for example I compare it with the data in Excel!

 

I am using the finantials data sample for Power BI with this simple measure:
Sales Above Average =

VAR AverageSales = [Average Sales]
VAR FiltredTable =
    FILTER(
        financials;
        financials[ Sales] > AverageSales
    )
VAR CountSales = COUNTROWS(FiltredTable)
RETURN
    CountSales
 
So I need to get the number of records above Average! The Results are not the same! But I believe the measure is well done. 
If i get a new Filtred Table in Power BI it works fine. So must be the evaluation context of the variables! 
Any help?
 
 
pbi1.pngpbi2.pngPbi3.png
1 ACCEPTED SOLUTION
HughLa
Resolver IV
Resolver IV

Hi @jteixeira 

 

Your measure is correct. I just had a look at the data myself and the results match between Power BI and the Excel file.

 

What value did you filter out on the Sales column in your excel file?

 

For October 2013, the average sales was 132794,44 so if you set the filter to greater that that it returns 16 rows in the Excel file as well.

HughLa_0-1681300959286.png

 

Regards

Hugh

View solution in original post

1 REPLY 1
HughLa
Resolver IV
Resolver IV

Hi @jteixeira 

 

Your measure is correct. I just had a look at the data myself and the results match between Power BI and the Excel file.

 

What value did you filter out on the Sales column in your excel file?

 

For October 2013, the average sales was 132794,44 so if you set the filter to greater that that it returns 16 rows in the Excel file as well.

HughLa_0-1681300959286.png

 

Regards

Hugh

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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