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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Building table of Average Monthly Sales

Hi

I'm trying to build a table that contains the average monthly sales PER Customer.

Then I want to see the trend of monthly sales compared to the average sales Year To Date per customer. This will help me to see the trend of customer orders.

 

Thanks in advance

 

YJAMOUS_0-1631744047321.png

CustomerJan-21Feb-21Apr-21May-21Jun-21Monthly Average Sales Year to Date (Per Customer)
Customer A      
Customer B      
Customer C      
Customer D      

 

I tried to use the following, but this gives me the average sales per day and NOT the average sales per month for each customer.

 

 

 

Tot. Value Transactions = sum(OrderData[OrderValue])
Average_Per_Customer = AVERAGEX(ALLEXCEPT(OrderData,OrderData[Customer Name]) , [Tot. Value Transactions])

 

 

 

 

I've attached sample data file. NOTE: On any day you can get several transactions for same customer. For simplicity, I just put one transaction per day.

 

Link to Sample Data 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , hope you have month year, Try like 

 

Average_Per_Customer = calculate(AVERAGEX(values(Table[Month Year]), [Tot. Value Transactions]),ALLEXCEPT(OrderData,OrderData[Customer Name]))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , hope you have month year, Try like 

 

Average_Per_Customer = calculate(AVERAGEX(values(Table[Month Year]), [Tot. Value Transactions]),ALLEXCEPT(OrderData,OrderData[Customer Name]))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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