Forum Discussion
Fixed Average in Matrix Table to use as a Measure
- 8 years ago
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:
Regards,
MFelix
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:
Regards,
MFelix