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 am trying to solve a problem. I have two tables and I need to filter for the current period value in Table 2 and divide it by the average of the filter of the first six months in Table 1.
Please see below for illutstration
Solved! Go to Solution.
This is the adjusted code:
AverageNext6Months =
var v_dates = DATESINPERIOD( DateNew[Date]; MAX( DateNew[Date] ); +5; MONTH )
return
AVERAGEX(v_dates;CALCULATE(SUM(Forecast[Forecast Value])))
Ratio:
Ratio = MAX(OH[OH Value]) / [AverageNext6Months]
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
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 |
---|---|
49 | |
26 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |