Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hola a todos,
Tengo una mesa con 30 columnas, digamos C1... C30. Y necesita crear un panel donde un usuario pueda usar la segmentación de datos para elegir qué columna sumar y generarla en un gráfico. Por ejemplo, cuando el usuario selecciona C7 en la segmentación de datos, el gráfico traza una suma de columna [C7].
Sé que una manera de lograr esto es crear 30 medidas y usar la función SWITCH(). Pero, ¿hay alguna manera de crear una sola medida y un nombre de columna de referencia con una variable?
¡Gracias!
Solved! Go to Solution.
Si puede utilizar el editor de consultas, seleccione C1... C30 y haga clic en columnas despivot. Eso le permitirá hacerlo fácilmente con un solo cálculo.
También debería poder utilizar la función UNION en DAX, consulte a continuación un ejemplo
https://stackoverflow.com/questions/50213905/is-it-possible-to-unpivot-in-power-bi-using-dax
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
Si puede utilizar el editor de consultas, seleccione C1... C30 y haga clic en columnas despivot. Eso le permitirá hacerlo fácilmente con un solo cálculo.
También debería poder utilizar la función UNION en DAX, consulte a continuación un ejemplo
https://stackoverflow.com/questions/50213905/is-it-possible-to-unpivot-in-power-bi-using-dax
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.