Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hola, tengo una medida que no puedo generar hace dias, resulta que tengo mi tabla llamada TABLA, dentro tengo varias columnas, una de esas es "Número de documento" y otra llamada "IRA", el numero de documento es la contabilizacion en sapb1 por lo cual tiene varias lineas, en la columna "IRA" tengo el porcentaje de cumplimiento de cada documento que esta en porcentaje, al obtener esta informacion, me arroja ese porcentaje en cada lina del documento y si este tiene 20 lineas, 20 veces se repite el porcentaje, estoy haciendo un informe referente a movimientos de inventario y necesito sacar el porcentaje de cumplimiento por dia, por mes y por año, para eso necesito crear una medida que me busque los valores unico de la columna "Número de documento" y con este filtro, me entregue el valor de la columna "IRA" que ahora solo mostrara un valor.
Favor su ayuda.
Solved! Go to Solution.
Hi @Jhophshepht
To make the total correct, you may create a new measure:
Measure = AVERAGEX(VALUES('Table'[Número de documento]),[IRA Value])
[IRA Value] is the old measure:
IRA Value = MAX('Table'[IRA])
The "incorrect total" behavior is common in table/matrix visuals in Power BI, you can refer to the following blogs about how to deal with it. This occurs because Power BI intends to calculate the total based on rows of underlying data instead of the rows displayed in the visual.
Why Power BI totals might seem inaccurate - SQLBI
Obtaining accurate totals in DAX - SQLBI
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi @Jhophshepht
Not sure if I understand it correctly. If your table is similar to below, you can create a simple measure with MAX to get the distinct IRA value for each Número de documento on each date.
IRA Value = MAX('Table'[IRA])
If this is not what you want, can you provide some dummy data and expected result to show what you want to accomplish?
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Gracias por la respuesta, estoy cerca. me da la informacion que necesito, pero el total de la columna no es el correcto, deberia ser 89.10%
Si uso la funcion Average, me da el promedio de toda la columna, pero tampoco es el correcto, me da 83.52%
Hi @Jhophshepht
To make the total correct, you may create a new measure:
Measure = AVERAGEX(VALUES('Table'[Número de documento]),[IRA Value])
[IRA Value] is the old measure:
IRA Value = MAX('Table'[IRA])
The "incorrect total" behavior is common in table/matrix visuals in Power BI, you can refer to the following blogs about how to deal with it. This occurs because Power BI intends to calculate the total based on rows of underlying data instead of the rows displayed in the visual.
Why Power BI totals might seem inaccurate - SQLBI
Obtaining accurate totals in DAX - SQLBI
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Muchas gracias, funciono, era lo que necesitaba.
en excel, si da el calculo bien, en que estare fallando, sera que promedia el valor de toda la columna sin diferenciar los valores que se muestran en la tabla?
sigo probando cosas y cree un tabla aparte solo con los datos de la primera tabla, pero el IRA como columna y si me da el promedio correcto, el problema se da con la medida, no se con que otros valores esta filtrando el promedio, comparto mi tabla, si se fijan ya tiene la columna IRA, ya sea que cree la medida o use esa columna el valor es el mismo.
| Número de documento | Fecha | Dia | Mes | Año | Número de artículo | Código de almacén | Sku Contados | Sku Cuadrados | IRA |
| 231001319 | 18-04-2024 | 18 | Abril | 2024 | 181031738 | VA0203 | 20 | 18 | 90,00% |
| 231001318 | 18-04-2024 | 18 | Abril | 2024 | 12341820 | VA0201 | 15 | 11 | 73,33% |
| 231001312 | 17-04-2024 | 17 | Abril | 2024 | 165021582 | VA0203 | 16 | 16 | 100,00% |
| 231001311 | 17-04-2024 | 17 | Abril | 2024 | 12435228 | VA0201 | 10 | 10 | 100,00% |
| 231001308 | 16-04-2024 | 16 | Abril | 2024 | 12453312 | VA0201 | 16 | 14 | 87,50% |
| 231001307 | 16-04-2024 | 16 | Abril | 2024 | 105020990 | VA0203 | 24 | 19 | 79,17% |
| 231001305 | 15-04-2024 | 15 | Abril | 2024 | 164031363 | VA0203 | 20 | 20 | 100,00% |
| 231001304 | 15-04-2024 | 15 | Abril | 2024 | 12311118 | VA0201 | 7 | 7 | 100,00% |
| 231001297 | 11-04-2024 | 11 | Abril | 2024 | 174061648 | VA0203 | 16 | 14 | 87,50% |
| 231001293 | 10-04-2024 | 10 | Abril | 2024 | 12449850 | VA0201 | 10 | 10 | 100,00% |
| 231001292 | 10-04-2024 | 10 | Abril | 2024 | 104020038 | VA0203 | 17 | 12 | 70,59% |
| 231001286 | 09-04-2024 | 9 | Abril | 2024 | 118047940 | VA0203 | 28 | 28 | 100,00% |
| 231001285 | 09-04-2024 | 9 | Abril | 2024 | 12364416 | VA0201 | 23 | 19 | 82,61% |
| 231001282 | 08-04-2024 | 8 | Abril | 2024 | 126028743 | VA0203 | 30 | 22 | 73,33% |
| 231001278 | 04-04-2024 | 4 | Abril | 2024 | 183021975 | VA0203 | 32 | 27 | 84,38% |
| 231001277 | 04-04-2024 | 4 | Abril | 2024 | 12452915 | VA0201 | 27 | 25 | 92,59% |
| 231001274 | 03-04-2024 | 3 | Abril | 2024 | 12450588 | VA0201 | 22 | 20 | 90,91% |
| 231001272 | 03-04-2024 | 3 | Abril | 2024 | 187032234 | VA0203 | 27 | 23 | 85,19% |
| 231001267 | 02-04-2024 | 2 | Abril | 2024 | 154047966 | VA0203 | 31 | 19 | 61,29% |
| 231001266 | 02-04-2024 | 2 | Abril | 2024 | 12341824 | VA0201 | 16 | 12 | 75,00% |
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.