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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.