Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hi All,
Looking for some guidance here.
Need to replace PY values of 0 with the average of PY where ENTITY, PC_GROUP & AC_GROUP are the same.
Any one have any ideas on how it can be done in DAX or should I be creating an aggregate table and linking it prior to the load?
| ENTITY | PC_GROUP | AC_GROUP | PERIOD | PY | CY |
| E1 | PC1 | G1 | P05 | 0 | 1 |
| E1 | PC1 | G1 | P06 | 1 | 1 |
| E1 | PC1 | G1 | P07 | 1.4848947 | 1 |
| E1 | PC1 | G1 | P08 | 1 | 1.21053 |
| E1 | PC1 | G1 | P09 | 1.3233083 | 1 |
I think this DAX will do what you are looking for. I named the table "PYData" and added a Calculated Column with this expression:
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |