cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rocco_z
Regular Visitor

DAX - weighted average per selected amount of days

Hello,

 

I have a data model containing one fact table and two dimension tables.

Rocco_z_0-1625828963936.pngRocco_z_1-1625828982057.png

Rocco_z_2-1625829047155.png

What I want to calculate is the following table:

Rocco_z_3-1625829105591.pngRocco_z_4-1625829350877.png

 

So profit can just be a SUM(Profit), but the column weight needs to be a measure. It needs to be the weighted average over the selected days. But as you can see. The Fact table doesn't need to contain data for every day. So the measure needs to keep that in mind.

 

So the question is, How can I calculate the weighted average per team/teams per selected amount of days?

 

Thanks in advance!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

 

 

https://www.dropbox.com/s/w435mnlx2tnwc6f/rocco.pbix?dl=0 

 

 


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.

Best regards, JiHwan Kim

Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

 

 

https://www.dropbox.com/s/w435mnlx2tnwc6f/rocco.pbix?dl=0 

 

 


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.

Best regards, JiHwan Kim

Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.