Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register 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.
User | Count |
---|---|
18 | |
18 | |
14 | |
14 | |
13 |
User | Count |
---|---|
17 | |
14 | |
11 | |
10 | |
8 |