cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## Average - But need to sum first

Hi,

Third time I write this topic.. Website is not helping me out today, haha. Hopefully you guys can 🙂

I need to calculate the average after a sum of the invoices.

Sample below:

 Amount Invoice Number ACTUAL INVOICE AMOUNT € 100.00 19700091 € 200.00 19700091 € 150.00 19700091 250 € 250.00 19700091 € 10.00 19700095 € 20.00 19700095 20 € 30.00 19700095 € 5.00 19700100 € 10.00 19700100 € 20.00 19700100 15 € 20.00 19700100 € 10.00 19700100 Average: 68,75 Average: 95

What I need is 95 as outcome, but currently I have 68,75. How do I fix this? I suppose it's easy but I can't get my head around it.

Thank you in advance for helping me out!
Below is my measure:

``````1. Factuur Gemiddelde =
CALCULATE(
//Average berekening
AVERAGEX(
SUMMARIZE(TransactionLinesBulk,TransactionLinesBulk[InvoiceNumber], TransactionLinesBulk[Bedrag]),
TransactionLinesBulk[Bedrag]),
//Filters
LEFT(GLAccountClass[ClassificationCode],4)="WOmz",
TransactionLinesBulk[InvoiceNumber] > 0,
TransactionLinesBulk[Bedrag] <> 0
)``````

1 ACCEPTED SOLUTION
Super User

@Anonymous , Try like

averageX(summarize(Table,table[Invoice Number], "_1",sum(Table[Amount])),[_1])

3 REPLIES 3
Super User

@Anonymous , Try like

averageX(summarize(Table,table[Invoice Number], "_1",sum(Table[Amount])),[_1])

Anonymous
Not applicable

Hi @amitchandak ,

Thanks! Works like a charm. Can you explain what the _1 is and why it works like that?

Super User

@Anonymous , it is new column name inside summarize

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

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

#### Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors