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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
jchungfluentco
Frequent Visitor

Fixed Average in Matrix Table to use as a Measure

Hi,

 

I am trying to get the average of a column in a matrix fixed so that I can use it as a static metric to divide against another measure in each row. The end result is to try to get Index_1, the index of sales against number of leads sent out.

To clarify, I created a matrix from TABLE_1 that has the following:


Column_1 = 'Sales'
Column_2 = 'Leads'
[Measure] Conversion Rate = SUM('Sales')/SUM('Leads')
Avg. Conversion Rate = AVERAGEX('TABLE_1', [Conversion Rate])
Index_1 = CALCULATE(DIVIDE([Conversion Rate],[Avg. Conversion Rate]))

 

The problem here is that I can't get the Avg. Conversion Rate of all rows in the matrix to become fixed so that I can divide it by the conversion rate, resulting in Index_1. What ends up happening is that when I drag Index_1 into the matrix, it results in 1 all the way down.

 

Does anyone have a solution to this? Is a SUMMARIZE table the best way?

 

Thanks!

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @jchungfluentco,

 

The measures are calculated based on context so based on that if you place a measure in a visual with some columns to make aggregations the calculations are made based on that aggregation, in order to achieve what you need, you have to take the Avg.Conversion Rate context to give you full result over the all table in this case use the following measure:

 

Avg. Conversion Rate =
CALCULATE (
    AVERAGEX ( 'Sales_lead'; [Conversion Rate] );
    ALLSELECTED ( Sales_lead )
)

I use the formula ALLSELECT if you want to calculate over the filtered values, for instance with a slicer if you want to make this a fixed variable indenpent of any slicer of filter  you put on your report you should use:

 

Avg. Conversion Rate =
CALCULATE (
    AVERAGEX ( 'Sales_lead'; [Conversion Rate] );
    ALL ( Sales_lead )
)

Be also ware that to have better performance you should try and use the columns and not the full table on your AVERAGEX and on your ALLSELECTED/ALL formulas.

 

Result below:

conversion.png

 

Regards,

MFelix

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @jchungfluentco,

 

The measures are calculated based on context so based on that if you place a measure in a visual with some columns to make aggregations the calculations are made based on that aggregation, in order to achieve what you need, you have to take the Avg.Conversion Rate context to give you full result over the all table in this case use the following measure:

 

Avg. Conversion Rate =
CALCULATE (
    AVERAGEX ( 'Sales_lead'; [Conversion Rate] );
    ALLSELECTED ( Sales_lead )
)

I use the formula ALLSELECT if you want to calculate over the filtered values, for instance with a slicer if you want to make this a fixed variable indenpent of any slicer of filter  you put on your report you should use:

 

Avg. Conversion Rate =
CALCULATE (
    AVERAGEX ( 'Sales_lead'; [Conversion Rate] );
    ALL ( Sales_lead )
)

Be also ware that to have better performance you should try and use the columns and not the full table on your AVERAGEX and on your ALLSELECTED/ALL formulas.

 

Result below:

conversion.png

 

Regards,

MFelix

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.