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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Bondeuz
Frequent Visitor

Display Average Monthly Sales Quantity

Hi,

 

Im looking into displaying avarage montly sales depending on the amount of months a product has been sold.

 

I want to show the SKU, Current inventory and Average monthly sales quantity in a column of their own. I already have SKU and current inventory but need to calculate the avarage monthly sales from a transactions table like below. How can i go about this?

 

If possbile i would like to use this data also for calculating a forecast of sales in the coming months.

 

SKUCurrent InventoryMonthly Average Sales Quantity
EXT-KIT-8256x

 

My Transaction table looks as following.

 

DateTransaction TypeSKUQuantity
2023-01-23SaleEXT-KIT-82-10,
2023-01-23SaleEXT-KIT-82-4,
2023-01-20SaleEXT-KIT-82-1,
2023-01-20SaleEXT-KIT-82-2,
2023-01-19SaleEXT-KIT-82-5,
2023-01-19SaleEXT-KIT-82-1,
2023-01-19SaleEXT-KIT-82-1,
2023-01-18SaleEXT-KIT-82-4,
2023-01-18SaleEXT-KIT-82-1,
2023-01-17SaleEXT-KIT-82-6,
2023-01-16SaleEXT-KIT-82-1,
2023-01-16SaleEXT-KIT-82-1,
2023-01-16SaleEXT-KIT-82-1,
2023-01-16SaleEXT-KIT-82-1,
2023-01-16SaleEXT-KIT-82-5,
2023-01-13SaleEXT-KIT-82-55,
2023-01-13SaleEXT-KIT-82-2,
2023-01-12SaleEXT-KIT-82-8,
3 REPLIES 3
amitchandak
Super User
Super User

@Bondeuz , try a measure like

 

AverageX(Values('Date'[MONTH Year]),calculate(Sum('Table'[Quantity]))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Could it have something to do with my quantity in transaction list being negative values? If i use a list of absolute values would that work?

Hi,

 

Thank you for the suggestion. I tried the following measure.

Average Monthly Demand = AVERAGEX(VALUES((Calender[Date])),CALCULATE(SUM(Yellow_ItemLedgerEntryBI[Quantity])))

But it just displays the current stock level instead of the monthly average.

I used my Calender date table which is not the in the same table as the posting date of the actual transaction. Is this correct? For my Date table i used CALENDERAUTO(12), could this be a factor?

 

 

Bondeuz_0-1685008420730.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.