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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
lawada
Helper III
Helper III

calculate subtotal percentage in a matrix without considering blank cells

i have a matrix that shows percentage per each column and row :

rows: current month

columns: difference between current month and previous month

values: measure[percentage of returned users]

 

i want to find the average row per each column but without considering any blank months .

current output 

lawada_0-1638354464848.png

for example , for column 63 output should be (20.93+16.67+20.59+12.50+23.33)/5=18.8%

 i want to show this output in the subtotal of matrix and create a measure for it to show it in a line chart

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @lawada ,

 

Try this:

calculate(Averagex(Values(Table[Rows column]) , CALCULATE( [percentage of returned users]))

 

I create a simple sample, not the same, just for reference. Please check if it works for you.

Measure 1 = 
AVERAGEX ( VALUES ( 'Table'[Category] ), CALCULATE ( SUM ( 'Table'[Value] ) ) )

Icey_0-1640228848341.png

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Icey
Community Support
Community Support

Hi @lawada ,

 

Try this:

calculate(Averagex(Values(Table[Rows column]) , CALCULATE( [percentage of returned users]))

 

I create a simple sample, not the same, just for reference. Please check if it works for you.

Measure 1 = 
AVERAGEX ( VALUES ( 'Table'[Category] ), CALCULATE ( SUM ( 'Table'[Value] ) ) )

Icey_0-1640228848341.png

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@lawada , ideally you should do is using allselected or removefilters 

 

calculate(Averagex(Values(Table[Rows column]) , [percentage of returned users]), removefilter(Table[Rows column]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

thank you the measure worked out , is there a way i can get same result for subtotal field in the matrix? as when i enabled the subtotal for the rows, im getting the average for all cells including blank cells

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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