Forum Discussion
Matrix Table need sum in table
hi there i have matix tabel i calcuate average price as below it work fine but in total i need this number 489.69 at total instead off others number i get in power bi
average price 1 =
IF (
ISFILTERED (Table1[LOCATION]),
DIVIDE (
SUM( Table1[ Sales ] ),
SUM( Table1[ Qty ] )
),
SUMX (
Table1 ,
DIVIDE (
SUM( Table1[ Sales ] ),
SUM( Table1[ Qty ] )
)
)
)
| LOCATION | Sales | Qty | average price | average price 1 |
| A | 203,725.00 | 4,190.00 | 48.62 | 48.62 |
| B | 57,956.00 | 1,592.00 | 36.40 | 36.40 |
| C | 186,901.00 | 3,196.00 | 58.48 | 58.48 |
| D | 43,358.00 | 955.00 | 45.40 | 45.40 |
| E | 124,106.00 | 2,457.00 | 50.51 | 50.51 |
| F | 69,353.00 | 1,591.00 | 43.59 | 43.59 |
| G | 126,141.00 | 3,012.00 | 41.88 | 41.88 |
| H | 30,548.00 | 848.00 | 36.02 | 36.02 |
| I | 163,677.00 | 3,908.00 | 41.88 | 41.88 |
| J | 439,064.00 | 10,279.00 | 42.71 | 42.71 |
| K | 15,419.00 | 349.00 | 44.18 | 44.18 |
| 489.69 |
https://u.pcloud.link/publink/show?code=XZ4AVEXZE8w6UMoMI30vzQQCabeISy0E3UEy
baselM try this
average price 1 = IF ( ISFILTERED (Table1[LOCATION]), DIVIDE ( SUM( Table1[ Sales ] ), SUM( Table1[ Qty ] ) ), SUMX ( VALUES ( Table1[Location] ) , DIVIDE ( CALCULATE ( SUM( Table1[ Sales ] ) ), CALCULATE ( SUM( Table1[ Qty ] ) ) ) ) )✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
1 Reply
- parry2kSuper User
baselM try this
average price 1 = IF ( ISFILTERED (Table1[LOCATION]), DIVIDE ( SUM( Table1[ Sales ] ), SUM( Table1[ Qty ] ) ), SUMX ( VALUES ( Table1[Location] ) , DIVIDE ( CALCULATE ( SUM( Table1[ Sales ] ) ), CALCULATE ( SUM( Table1[ Qty ] ) ) ) ) )✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡