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
mboucher_rcr
Frequent Visitor

Average Inventory

Hi,

 

I am trying to calculate GMROI per item and am having trouble getting the average inventory cost.

 

My data is something like this:

DateStoreItemSOHValue
30 May 2022A110
30 May 2022B120
6 June 2022A110
6 June 2022B120
13 June 2022A110
13 June 2022B120

 

If I try 

AvgSOHValue = AVERAGE(ItemSales[SOHValue])
I get 15 because it divides total SOH (90) by the number of records (6).

 

Instead I want the 90 divided by the number of dates (3), so I'm getting an average SOH overall instead of per store.

 

Can anyone please help?

 

Thanks,
Michael

1 ACCEPTED SOLUTION
ddpl
Solution Sage
Solution Sage

@mboucher_rcr 

 

Create below measure and put it in card

 

Avg = SUM(ItemSales[SOHValue]) / DISTINCTCOUNT(ItemSales[Date])
 
Hope it will work for you.

View solution in original post

1 REPLY 1
ddpl
Solution Sage
Solution Sage

@mboucher_rcr 

 

Create below measure and put it in card

 

Avg = SUM(ItemSales[SOHValue]) / DISTINCTCOUNT(ItemSales[Date])
 
Hope it will work for you.

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.