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.
*I'm simplifying the math involved and the numbers aren't really representative of what I'm calculating
In Excel,
1. I have a calculation for a 3 Month Average Rate. The calculation takes the average of the last 3 months and returns a value.
jan | feb | march | |
num | 5 | 2 | 6 |
den | 10 | 23 | 5 |
rate | 0.5 | 0.086957 | 1.2 |
3 Month Average Rate =
0.595652 |
2. I have a second calculation for that is 3 Month Average Rate * den
jan | feb | march | |
num | 5 | 2 | 6 |
den | 10 | 23 | 5 |
rate | 0.5 | 0.086957 | 1.2 |
calc2 | 5.956522 | 13.7 | 2.978261 |
The 3 Month Average Rate stays static, but the den changes by month.
In Power BI,
1. I have a 3 Month Average Rate measure that calculates the average from the last 3 months.
3 Month Average (%) = CALCULATE(SUM('table'num)/Sum('table'den),DATESINPERIOD('Date'[Date], [Selected Date], -3, MONTH))
2. I need to make a second measure that calculates 3 Month Average (%) * den, but the 3 Month Average (%) should be static and the den should be associated with the month it aligns to. How do I create a DAX measure that doesn't recalculate the 3 Month Average (%) by month and multiplies that by the changing den by month?
Solved! Go to Solution.
Hi @tasmiaa,
You can calculate the 3 Month Average Rate with a calculated column. While create a measure to multiply it with dynamical "den" values.
Regards,
Yuliana Gu
Hi @tasmiaa,
You can calculate the 3 Month Average Rate with a calculated column. While create a measure to multiply it with dynamical "den" values.
Regards,
Yuliana Gu
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 |
---|---|
114 | |
100 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |