Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ton-v
Frequent Visitor

addition of the values in the visible or displayed rows

Hello,

 

i have used a matrix visual to have, to have hierarchys on my columns. On the column i have the producs and producs type. ase i have used average formulas i don't have the same amount on the sub total.

 

exemple :

 

Type 2          25000

Product A     15000

Product B       2000

Product C       6000

 

How can i have the addition of the values in the visible or displayed rows on my matrix visual ?

 

Thank you in advance

 

 

 

 

1 ACCEPTED SOLUTION
AnthonyTilley
Solution Sage
Solution Sage

What your looking for is a semi additive avarge where by the avarge is still calculated for the the individual products but a sum for the type.

 

I asumme your measure currently is measure = Avarege([Value])

 

--Wrap your avarge in an SumX with the table section, values that of the second level 2 of your hieracy in this case product.

measure = SUMX(values(Table1[PRODUCT]),AVERAGE(Table1[value]))
 
the image below is an example of this function

sumx.png

there is a good article opn these measures

https://sqlkover.com/calculate-a-semi-additive-average-in-dax/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
AnthonyTilley
Solution Sage
Solution Sage

What your looking for is a semi additive avarge where by the avarge is still calculated for the the individual products but a sum for the type.

 

I asumme your measure currently is measure = Avarege([Value])

 

--Wrap your avarge in an SumX with the table section, values that of the second level 2 of your hieracy in this case product.

measure = SUMX(values(Table1[PRODUCT]),AVERAGE(Table1[value]))
 
the image below is an example of this function

sumx.png

there is a good article opn these measures

https://sqlkover.com/calculate-a-semi-additive-average-in-dax/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you it worked !

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.