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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Diogo_Ferreira
New Member

AVERAGEIFS in Power BI

Hello Guys,

I need to run the excel FUNCTION AVERAGEIFS in Power BI.
I've tried AVAREGE, AVAREGEX, but i haven't had any success.

The data below the function is followed.

Measure =
AVERAGEIFS(
'Registros'[D],
'Registros'[Situação Fornecedor CA] <> "Não Contabilizar",
'Registros'[Último Movimento] = "Sim",
'Registros'[Cancelado] <> "Sim",
'Registros'[Categoria_Maior] <> "Solicitações de serviço",
'Registros'[Categoria_Maior <> Demandas Internas"
)

Diogo_Ferreira_0-1673326365778.png

Tks

Big Hug's

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Diogo_Ferreira 

 

In addition to vicky's solution, you may also try to write a measure like this:

Measure =
AVERAGEX(
    FILTER(
    'Registros',
    'Registros'[Situação Fornecedor CA] <> "Não Contabilizar"
        &&'Registros'[Último Movimento] = "Sim"
        &&'Registros'[Cancelado] <> "Sim"
        &&'Registros'[Categoria_Maior] <> "Solicitações de serviço"
        &&'Registros'[Categoria_Maior <> Demandas Internas"
    ),
    'Registros'[D]
)

View solution in original post

3 REPLIES 3
Diogo_Ferreira
New Member

Thank you very much, guys.
Big Hug

FreemanZ
Super User
Super User

hi @Diogo_Ferreira 

 

In addition to vicky's solution, you may also try to write a measure like this:

Measure =
AVERAGEX(
    FILTER(
    'Registros',
    'Registros'[Situação Fornecedor CA] <> "Não Contabilizar"
        &&'Registros'[Último Movimento] = "Sim"
        &&'Registros'[Cancelado] <> "Sim"
        &&'Registros'[Categoria_Maior] <> "Solicitações de serviço"
        &&'Registros'[Categoria_Maior <> Demandas Internas"
    ),
    'Registros'[D]
)
vicky_
Super User
Super User

You will need to use the CALCULATE function with a filter on the Registros table. Try a something like: 

 

Measure =
CALCULATE(
    AVERAGE('Registros'[D]),
    'Registros'[Situação Fornecedor CA] <> "Não Contabilizar",
    'Registros'[Último Movimento] = "Sim",
    'Registros'[Cancelado] <> "Sim",
    'Registros'[Categoria_Maior] <> "Solicitações de serviço",
    'Registros'[Categoria_Maior <> Demandas Internas"
)

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.