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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Asa94
Helper I
Helper I

Calculating the Sum of the Weighted Average with set Weighted Factors over a 6 month period

Hi everyone,

 

I have been trying to figure out how to calculate a sum of the wieghted averages over a 6 month period.

 

Asa94_0-1620801825894.png

Basically, I have sales file which has data for the past 6 months of the demand for pieces:

 

- Each month has the demand for the number of pieces

- Each month has a Weight Factor attached to it (This is a set factor)

- The weighted demand is calculated by the demand (in pieces) multiplied by the Weight factor for that month

 

= In the end, I have to sum all of the weighted demand.

 

My question would be how to associate the months with the weighted factor in the best way possible? Would it be best for me to create a new table and assign the months to an index? Any ideas would be helpful 🙂

 

Kind Regards,

Asa

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @Asa94 

I tried to create a sample pbix file based on the explanation.

Please check the below picture and the sample pbix file's link down below.

All measures are in the sample pbix file.

 

Picture2.png

 

 

https://www.dropbox.com/s/lei4h3n0oftbgx7/asa.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

7 REPLIES 7
Asa94
Helper I
Helper I

Hi @amitchandak and @Jihwan_Kim,

 

Thank you both for your replies. It is really appreciated 🙂

 

@Jihwan_Kim that file really helped to visualise and understand your logic! If I may, I do have further questions with regards to 1 or 2 measures :). Thank you again for the file and how quickly you done it 😮

Hi, @Asa94 

Thank you for your feedback.

Please let me know your questions.

Thank you very much.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi @Jihwan_Kim ,

 

Cool, the 'Demand total by custom month' measure is quite interesting. Is it possible to go through it step by step?

 

Thank you

Hi, @Asa94 

Please check the link down below.

I tried to comment inside the measure.

Please open the measure and you can see the comments that I wrote.

Thank you.

 

https://www.dropbox.com/s/lei4h3n0oftbgx7/asa.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi @Jihwan_Kim 

 

Thank you so much! This has been such a great help!

Jihwan_Kim
Super User
Super User

Hi, @Asa94 

I tried to create a sample pbix file based on the explanation.

Please check the below picture and the sample pbix file's link down below.

All measures are in the sample pbix file.

 

Picture2.png

 

 

https://www.dropbox.com/s/lei4h3n0oftbgx7/asa.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
amitchandak
Super User
Super User

@Asa94 , You need to have common date or month column to join both demand and weight table, then you can try measure like

 

Sumx(values(Month[Month), sum(Demand[value]) * max(Table[Weight Factor]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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