Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone,
I have been trying to figure out how to calculate a sum of the wieghted averages over a 6 month period.
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
Solved! Go to Solution.
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.
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.
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.
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.
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.
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.
@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]))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
96 | |
80 | |
67 | |
62 |
User | Count |
---|---|
137 | |
106 | |
104 | |
81 | |
63 |