Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi All,
I get two different outputs while using AVERAGE. In excel, i get a different value and in PowerBI a different value.
Can I know why that is happening?
I have attached the images below:
Any help would be appreciated!
Thank you!
Solved! Go to Solution.
If you are creating a
ABC =
DIVIDE(AVG2[col1]+AVG2[col2]+AVG2[col3]+AVG2[col4]+AVG2[col5],
IF(ISBLANK(AVG2[col1]),0,1)+
IF(ISBLANK(AVG2[col2]),0,1)+
IF(ISBLANK(AVG2[col3]),0,1)+
IF(ISBLANK(AVG2[col4]),0,1)+
IF(ISBLANK(AVG2[col5]),0,1)
,BLANK())
calculated column then you may need to use this.
Proud to be a Super User!
The average function skips the Blank/NULL values from data. i.e. if the Price is null for the period then that period will not be calculated on Average. And when you are writing the DAX formula in Power BI you are explicitly dividing it by 9 hence giving you an average of by 9.
Proud to be a Super User!
@FarhanAhmed Thank you!
Can I also know how to correct the formula so as to get the same result as excel?
In Divisor you need to put something like
= VALUES / ( COUNT(column1) + COUNT(Column2) + COUNT(column3) .... COUNT(Column9))
this count will give nothing when it finds null values. so it will divide your data by 5 instead of 9. if all columns have some value then it will divide by 9
Proud to be a Super User!
If you are creating a
ABC =
DIVIDE(AVG2[col1]+AVG2[col2]+AVG2[col3]+AVG2[col4]+AVG2[col5],
IF(ISBLANK(AVG2[col1]),0,1)+
IF(ISBLANK(AVG2[col2]),0,1)+
IF(ISBLANK(AVG2[col3]),0,1)+
IF(ISBLANK(AVG2[col4]),0,1)+
IF(ISBLANK(AVG2[col5]),0,1)
,BLANK())
calculated column then you may need to use this.
Proud to be a Super User!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
86 | |
76 | |
74 | |
56 | |
45 |
User | Count |
---|---|
117 | |
105 | |
77 | |
66 | |
64 |