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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Young_G_Han
Helper III
Helper III

How to sum the monthly average sales when the sales periods are different?

 Hi.

 

I have a very difficult issue...

 

I have to sum monthly average sales of many different items sold in different periods.

Periods are from each sales start date to today.

 

For example,

 

Product  Sales Start Date  Transaction Date Q'ty

A              2022-01-01       2021-02-01         100

B               2022-03-12      2021-04-11          200

A              2022-01-01       2023-02-01          100

B               2022-03-12      2022-04-11           50

 

In the case of product A, the period from 2022-01-01 to 2023-05-04, so the average of the monthly sales I want is 200 / 17months = 11.76.

Product B, the period from 2022-03-01 to 2023-05-04, so the average of the monthly sales I want is 250 / 15months = 16.67.

 

I want the sum of each product's monthly average sales like 11.76 + 16.67.

Of course, I want to make a table and graphs showing the average monthly sales by product.

 

I already add a column in the table with the DATEDIFF( start date, today(), month) to get the period and divide the sales quantity by the month.

I could see the quantity in the table, but I could not sum the values. The visualization shows N/a as the answer.

How can I solve the problem...?

 

Please help.

1 ACCEPTED SOLUTION
Kannan_n
Advocate I
Advocate I

Hi @Young_G_Han 

 

From my understanding, you need the sum of the product value. I have added the screenshot please loot it 

I have added a new column in the Data View 

Differen = 'Table'[Qty]/DATEDIFF('Table'[Sdate],TODAY(),MONTH)
 
this only you need 

 

Kannan_n_0-1683177795785.png

Kannan_n_1-1683177871995.png

 

If the answer is Happy Give a Like & are satisfied with the Answer Make the question Resolved 

Thanks/Regards 

Kannan. N

View solution in original post

2 REPLIES 2
Young_G_Han
Helper III
Helper III

Thank you so much. I thought it would be the only solution.

Your logic is working.

Kannan_n
Advocate I
Advocate I

Hi @Young_G_Han 

 

From my understanding, you need the sum of the product value. I have added the screenshot please loot it 

I have added a new column in the Data View 

Differen = 'Table'[Qty]/DATEDIFF('Table'[Sdate],TODAY(),MONTH)
 
this only you need 

 

Kannan_n_0-1683177795785.png

Kannan_n_1-1683177871995.png

 

If the answer is Happy Give a Like & are satisfied with the Answer Make the question Resolved 

Thanks/Regards 

Kannan. N

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.