Forum Discussion
measure dax %
- Anonymous2 years ago
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%
- Jhophshepht2 years agoFrequent Visitor
Si uso la funcion Average, me da el promedio de toda la columna, pero tampoco es el correcto, me da 83.52%
- Anonymous2 years agoNot applicable
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!- Jhophshepht2 years agoFrequent Visitor
Muchas gracias, funciono, era lo que necesitaba.
- Jhophshepht2 years agoFrequent Visitor
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?
- Jhophshepht2 years agoFrequent Visitor
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%