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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Guys,
I wan't to ignore an average which is calculated in a certain metric when there is no data available for a certain year for another metric. I have this matrix:
| Year | Avg1 | Avg2 |
| 2017 | 15 | |
| 2018 | 10 | 12 |
| 2019 | 14 | 19 |
| 2020 | 12 | 12 |
| total | 12 | 14.5 |
For my report, I'm calculating and presenting the overall difference between avg1 and avg2. What I wan't is when no data available for a certain year for avg1, don't calculate the average for avg2 (I'm not presenting the matrix, but only the overall). 15 is now influencing the overall comparison which is wrong. How to solve this?
The measures I'm using the calculate the averages are pretty basic: sum(sales) / distinctcount(orderid)
Hi @Anonymous
You can calculate Avg2 only when Avg1 is not blank using below logic
Avg2 = IF( ISBLANK(AVG1), BLANK(),sum(sales) / distinctcount(orderid))
i was thinking the same, but not too sure it will work when it calculates at the total level. as when the year context is removed [avg1] wont be blank so 2017 will be included? just thinking I could be wrong.
cool, it is fun seeing peoples solutions on here. always learning something new.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 17 | |
| 12 |