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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Average by row in a matrix

Hi,

i have a matrix with 3 row(Supplier,Order Number,Item) and different values, so i can drill down 3 times.                  

Supplier                         

     Order Number      

         Item                    

 

I need to average a comlumn value for every matrix row. So if i drill down i will see a different value.

 

Immagine.png

Is it possibile? How can i do that?

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

thanks for help.

 

I forgot to change data type from text to number. So average didn't work.

Get it =

CALCULATE(SUM(PRC_VENDPACKINGSLIPTRANS[GG Pos]);ALLSELECTED(PRC_VENDPACKINGSLIPTRANS[GG Pos]))/ COUNT(PRC_VENDPACKINGSLIPTRANS[GG Pos])
 
It seems work but i will take a look to your post!
 
Thanks

View solution in original post

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous ,

 

You should consider using ISINSCOPE to judge what kind of context the measure (Avg) is under, and use ALLSELECTED to restrain the context in the iterative calculation.

Here is an example showing how to Create a Dynamic Rank in Matrix with Hierarchy

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi,

thanks for help.

 

I forgot to change data type from text to number. So average didn't work.

Get it =

CALCULATE(SUM(PRC_VENDPACKINGSLIPTRANS[GG Pos]);ALLSELECTED(PRC_VENDPACKINGSLIPTRANS[GG Pos]))/ COUNT(PRC_VENDPACKINGSLIPTRANS[GG Pos])
 
It seems work but i will take a look to your post!
 
Thanks

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (5,083)