Forum Discussion
Column averages in Power BI matrix
Hi community,
I'm working with a matrix visual in Power BI where I calculate the average productivity using a custom measure called Promedio Productividad H 2. As shown in the image below, the row averages (Total column in green) are correctly calculated at each level (Agenda, Contratista, TecnologĂa, etc.).
Promedio Productividad H 2 =
SWITCH(
TRUE(),
ISINSCOPE(BaseHistorica_Pedidos[Tecnologia]), [Productividad H],
ISINSCOPE(BaseHistorica_Pedidos[Tipo Agenda]),
AVERAGEX(
SUMMARIZE(
BaseHistorica_Pedidos,
BaseHistorica_Pedidos[Contratista],
BaseHistorica_Pedidos[Tecnologia],
BaseHistorica_Pedidos[Tipo Agenda]
),
[Productividad H]
),
AVERAGEX(
SUMMARIZE(
BaseHistorica_Pedidos,
BaseHistorica_Pedidos[Contratista],
BaseHistorica_Pedidos[Tipo Agenda],
BaseHistorica_Pedidos[Tecnologia]
),
[Productividad H]
)
)
Productividad H is calculated as:
[Finalizados H] / DISTINCTCOUNT(BaseHistorica_Pedidos[Tecnico: Nombre])Finalizados H is also a measure.
📌 The problem is:
I also need this same measure to calculate the column averages (e.g., for Day 1, Day 2, etc. as shown in blue). However, the current measure doesn't return the correct values in the column totals. Instead, it seems to sum or behave unexpectedly.
- Anonymous1 year ago
Hi Santy241,
May I ask if you have resolved this issue? If not, Kindly provide the sample data so that we can look for a possible solution.
Thank you.
4 Replies
- lbendlin
Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - AnonymousNot applicable
Hi Santy241,
May I ask if you have resolved this issue? If not, Kindly provide the sample data so that we can look for a possible solution.
Thank you.
- AnonymousNot applicable
Hi Santy241 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you. - AnonymousNot applicable
Hi Santy241,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the community members for the issue worked. If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Thanks and regards