cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tgz666
New Member

How to : Matrix Average values and sum subtotal

Hi eveybody,

I have some values like this

tgz666_0-1663831797101.png

and Matrix Object like that

tgz666_1-1663831856283.pngtgz666_2-1663831876099.png

For each REF i have the monthly average (OK, it's what i want) but for the PTF subtotal i wish the sum of averages not the average

for example : PTF1/202202 (aaaaa+bbbbb = 6.00+3.50) = 9.50 not 4.75

How can i do that ?

Thanks

1 ACCEPTED SOLUTION

Unfortunatly, isn't ok sub total PTF isn't equal to sum(ref)

tgz666_0-1663854550460.png

I have found an another method with transformation data : Group By

= Table.Group(#"Added Custom", {"PTF", "yyyymm", "REF"}, {{"ValueMoy", each List.Average([Value]), type nullable number}})

tgz666_1-1663854736959.png

It's ok

 

 

View solution in original post

2 REPLIES 2
serpiva64
Super User
Super User

Hi,

try this measure

Measure = if (HASONEVALUE('Table'[REF]),AVERAGE('Table'[Value]),calculate(AVERAGE('Table'[Value]), ALL('Table'[Date])))
 
you will obtain this
serpiva64_0-1663836154532.png

If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution !

 

Unfortunatly, isn't ok sub total PTF isn't equal to sum(ref)

tgz666_0-1663854550460.png

I have found an another method with transformation data : Group By

= Table.Group(#"Added Custom", {"PTF", "yyyymm", "REF"}, {{"ValueMoy", each List.Average([Value]), type nullable number}})

tgz666_1-1663854736959.png

It's ok

 

 

Helpful resources

Announcements
T-Shirt Design Challenge 2023

Power BI T-Shirt Design Challenge 2023

Submit your creative T-shirt design ideas starting March 7 through March 21, 2023.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!