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

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.

Reply
KevinCP
Frequent Visitor

dynamic weighted average measure w/o creating additional tables

Below is a screenshot of my data. I'm attempting to calculate the weighted average percentage increase in employees for weeks up to the last week of data for TY Employees. I've used the following code to do this statically: % Change in Employees YTD = CALCULATE(SUM(Hours[TY Employees])/SUM(Hours[LY Employees])-1, FILTER(WeekBridge, WeekBridge[Week]<=8)). TY Employees and LY employees are both calculated columns. The code above was used to create the card with 16.9% to the right. 

 

Does anyone know how to do this dynamically without creating additional tables? Please advise if you need additional information to answer the question. Thanks in advance! Capture.PNG

 

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@KevinCP,

 

Take a good look at https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks! 

@KevinCP,

 

By the way, if it helps, you may help accept solution. Your contribution is highly appreciated.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The solution was helpful but I'm not sure that it's exactly what I'm looking for. I'm still without a solution. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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