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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Average SKU per Invoice calculation

Hello All,

 

I need help calculating the average SKU per invoice, the calculation of which is=

(SKU Sold Per Invoice X No of Invoices)/Total No of Invoices

 

I have a transaction table with invoice numbers and their corresponding SKU's, from which i calculated the no of SKU's per invoice which is shown in the following table: 

Invoice NoSKU Count
A100122
A100223
A100323
A100424
A100525
A100626
A100726
A100826
A100927
A101028
A101128

 

Now, what I'am struggling with is the no. of invoices per SKU count, for eg:

23 SKU's have been billed twice and 26 SKU's have been billed thrice.

 

How can I calculate the no of invoices per SKU count?

 

Please help

 

1 ACCEPTED SOLUTION
LivioLanzo
Solution Sage
Solution Sage

Hi 
@Anonymous

 

you need to create a calculated table which returns the table you're showing below. Then drop the SKU Count on the rows section of a matrix and add a measure which does COUNTROWS( <the_calculated table_you_created> )

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

View solution in original post

7 REPLIES 7
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous

 

You may use SUMMARIZE Function to get a new table. Then you may get the no of invoices per SKU count with the table. For example:

Table =
SUMMARIZE ( Table, Table[Invoice No], "SKU Count", [Meaure] )

Regards,

Cherie

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-cherch-msft,

 

I tried the method mentioned but I'am facing an error.

LivioLanzo
Solution Sage
Solution Sage

Hi 
@Anonymous

 

you need to create a calculated table which returns the table you're showing below. Then drop the SKU Count on the rows section of a matrix and add a measure which does COUNTROWS( <the_calculated table_you_created> )

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Anonymous
Not applicable

Hey @LivioLanzo,

Thanks for your help.

I've been able to do the required calculation.

Anonymous
Not applicable

Thanks @LivioLanzo,

 

I created a table using:

Table = SUMMARIZE('Transaction','Transaction'[Inv No.],"Count items",COUNT('Transaction'[ITEM]))
 
Now, I created a measure:
Count=COUNTROWS(Table)
 
When i multiply them in a measure, Count items * count, I obtain the following:
Count itemsCountCount items*Count
22122
20120
195475
18272

 

There is a duplicacy taking place at the time of multiplication.

How do i remove that?

 
 

Hi @Anonymous

 

how are you performing your multiplication>?

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Anonymous
Not applicable

@LivioLanzo, I created a measure:

Measure = SUM('Table'[Count items])*[Count]

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.