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
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
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.