Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello all,
Hoping for some assistance with this effort. I have the below matrix example, calculating the absolute error of forecast vs sales by product family by month:
I'm trying to calculate the YTD abs error and YTD average absolute error - so going from top to bottom (Cube to Sphere) for February I would expect the YTD avg abs error to be 11.02, 31.965, 42.99, and 132.28 respectively, and March would start off with 9.55 for Cube (avg of 11.02 for Jan + 11.02 for Feb + 6.61 for March), and so on.
I'd additionally like the YTD abs error value to be the sum of each month's abs error, rather than recalculating it monthly based on the sum of the FC and sales. (So, for example, March's YTD abs error for Cube would be 11.02+11.02+6.61 = 28.65, not the sum of orders from Jan-Mar (22.05+33.07+26.46) - the sum of FC from Jan-Mar (11.02+22.05+33.07) = 15.44).
I've attached a GDrive link to the example pbix for examination - please go easy on my limited DAX knowledge at this point. Help
Thank you. For the monthly buckets, this works perfectly. However, it doesn't appear to be totaling correctly.
Is there an easy change to the formula or another measure to correct this?
Link to updated pbix file: https://drive.google.com/file/d/10mzPDK4dzcV3nx3CIJXt90EFSTRkR73q/view?usp=drive_link
@U382911 , For ytd you can use time intelligence using date table
YTD Sales = CALCULATE(SUM(Table[error]),DATESYTD('Date'[Date],"12/31"))
for error
YTD Sales = CALCULATE(Averagex(Values(Date[Month Year]), calculate( SUM(Table[error]))) ,DATESYTD('Date'[Date],"12/31"))
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |