Forum Discussion
Totalizar valores de una medida calculada
Buenas tardes
Tengo una tabla TAMBIENTES de la siguiente forma
| IDEDIFICACION | NROPISO | IDAMBIENTE |
| 001 | 1 | 0011001 |
| 001 | 1 | 0011002 |
| 001 | 1 | 0011003 |
| 001 | 2 | 0012001 |
| 001 | 2 | 0012002 |
| 001 | 2 | 0012003 |
| 001 | 3 | 0013001 |
| 001 | 3 | 0013002 |
| 001 | 3 | 0013003 |
| 001 | 3 | 0013004 |
| 002 | 1 | 0021001 |
| 002 | 1 | 0021002 |
| 002 | 2 | 0022001 |
| 002 | 2 | 0022002 |
| 002 | 3 | 0023001 |
| 002 | 3 | 0023002 |
la cual tiene una tabla detalle llamada TAMBIENTESCALIFICACION,
| IDAMBIENTE | CRITERIO | CALIFICACION |
| 0011001 | 1 | 1 |
| 0011001 | 2 | 0.5 |
| 0011001 | 3 | 0 |
he creado una medida que calcula la calificacion para cada registro de la tabla TAMBIENTES, con la siguiente formula
| IDAMBIENTE | mTieneBrecha |
| 0011001 | 0 |
| 0011002 | 1 |
| 0011003 | 1 |
| 0012001 | 1 |
| 0012002 | 0 |
| 0012003 | 0 |
| total brecha |
Necesito una formula que permita obtener el total por piso y el total por edificacion edificacion, agradecezco de antemano su gentil apoyo
- Anonymous2 years ago
Thanks for the reply from lbendlin , please allow me to provide another insight:
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.Second, you can use custom columns to group the top half of the field output by:
Text.Start([IDAMBIENTE],4)3.Then, using the matrix, modify the settings for the visualization:
4.Next, modify your measure to a calculated column:
5.Here are the end results:
If I misunderstand your needs, I hope you can point out where I understand wrong, and preferably have an expected output.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- lbendlin
Super User
Something seems to be off with your IDAMBIENTE field. Shouldn't that be two separate columns? One for building and one for floor?
- YvsNew Member
En la dimension TAMBIENTES el piso y la edificacion estan separados como se presenta en la primera tabla, la última tabla representa el gráfico usado en el powerbi para visualizar el resultado
- AnonymousNot applicable
Thanks for the reply from lbendlin , please allow me to provide another insight:
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.Second, you can use custom columns to group the top half of the field output by:
Text.Start([IDAMBIENTE],4)3.Then, using the matrix, modify the settings for the visualization:
4.Next, modify your measure to a calculated column:
5.Here are the end results:
If I misunderstand your needs, I hope you can point out where I understand wrong, and preferably have an expected output.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.