Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Buenos días
Tengo una situación como esta:
y lo estoy replicando como una matriz.
Pero me preguntaron si puedo cambiar la opinión a esto:
¿cómo puedo poner dos valores en un campo alineado en el centro?
o, si no puedo hacer lo anterior, me gustaría poder replicar una situación como esta:
¿Cómo puedo poner un espacio antes del nombre del campo?
gracias a todos por la ayuda
Saludos
Solved! Go to Solution.
Hola, @tarz
Según su descripción, creé datos para reproducir su escenario. El archivo pbix se adjunta al final.
Mesa:
Kpi:
A continuación, debe hacer 'KPI1', 'KPI2', 'KPI3' seleccionados y despivos ellos.
No hay ninguna relación entre tablas. Puede crear una medida como se indica a continuación.
Result =
var t =
ADDCOLUMNS(
CROSSJOIN(
DISTINCT('KPI'[New KPI]),
DISTINCT('Table'[Year])
),
"Result",
IF(
[New KPI]="KPI1",
CONCATENATEX(
FILTER(
ALL('Table'),
[KPI] in {"KPI1","KPI2"}&&
[Year]=EARLIER('Table'[Year])
),
[Value],
UNICHAR(10)
),
CONCATENATEX(
FILTER(
ALL('Table'),
[KPI]=EARLIER('KPI'[New KPI])&&
[Year]=EARLIER('Table'[Year])
),
[Value],
UNICHAR(10)
)
)
)
return
CONCATENATEX(
t,
[Result],
UNICHAR(10)
)
Resultado:
Saludos
Allan
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Hola, @tarz
Según su descripción, creé datos para reproducir su escenario. El archivo pbix se adjunta al final.
Mesa:
Kpi:
A continuación, debe hacer 'KPI1', 'KPI2', 'KPI3' seleccionados y despivos ellos.
No hay ninguna relación entre tablas. Puede crear una medida como se indica a continuación.
Result =
var t =
ADDCOLUMNS(
CROSSJOIN(
DISTINCT('KPI'[New KPI]),
DISTINCT('Table'[Year])
),
"Result",
IF(
[New KPI]="KPI1",
CONCATENATEX(
FILTER(
ALL('Table'),
[KPI] in {"KPI1","KPI2"}&&
[Year]=EARLIER('Table'[Year])
),
[Value],
UNICHAR(10)
),
CONCATENATEX(
FILTER(
ALL('Table'),
[KPI]=EARLIER('KPI'[New KPI])&&
[Year]=EARLIER('Table'[Year])
),
[Value],
UNICHAR(10)
)
)
)
return
CONCATENATEX(
t,
[Result],
UNICHAR(10)
)
Resultado:
Saludos
Allan
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
¿Cómo están los datos sin procesar? ¿Está todo en una mesa? ¿Tiene una tabla Categoría que muestra que KPI 1 y KPI 2 forman parte de la misma categoría? Si tiene esto, podría usar el diseño escalonado en matriz en Desactivado y establecer Categoría y KPI como filas.
Por ejemplo, agregue una tabla como:
Categoría | Kpi |
A | KPI 1 |
A | KPI 2 |
B | KPI 3 |
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |