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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

How to write excel formula in Power BI?

Hello,
How to write below excel formula into Power BI?
=IFERROR(AVERAGEIF('Historical '!$A$3:$X$100687,'Current Year '!$A2,'Historical '!$X$3:$X$100687),"No AUP ")

Historical $A$3 is table,current year and Historical $x$3 are column.I am not sure do i need also need lookup as well.Thanks

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @tejapowerbi123

I use the formula in Excel, it throws an error as below

=AVERAGEIF($A$3:$B$9,$A2,$B$3:$B$9)

6.png

 

According to reference hereAVERAGEIF(range, criteria, [average_range])

the "criteria" in your formula is not clear.

 

In power bi, similar formula as above is 

AVERAGE = CALCULATE(AVERAGE(Historical[Historical]),FILTER(ALL(Historical),[Current Year]=2016))

IFERROR = IFERROR([AVERAGE],"No AUP")

7.png

 

 

Best Regards

Maggie

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.