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

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:

 Date Store Item SOHValue 30 May 2022 A 1 10 30 May 2022 B 1 20 6 June 2022 A 1 10 6 June 2022 B 1 20 13 June 2022 A 1 10 13 June 2022 B 1 20

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.

Thanks,
Michael

1 ACCEPTED SOLUTION
Solution Sage

Create below measure and put it in card

Avg = SUM(ItemSales[SOHValue]) / DISTINCTCOUNT(ItemSales[Date])

Hope it will work for you.
Solution Sage

Create below measure and put it in card

Avg = SUM(ItemSales[SOHValue]) / DISTINCTCOUNT(ItemSales[Date])

Hope it will work for you.

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 - June 2024

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

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors