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.
¿Puede alguien ayudar con el DAX adecuado para resolver esto.
Tengo estos datos
Proyecto # | tipo de defecto | Qty |
1 | a | 3 |
1 | b | 1 |
1 | c | 1 |
1 | a | 2 |
1 | a | 1 |
1 | a | 1 |
1 | b | 2 |
2 | a | 1 |
2 | b | 1 |
2 | b | 1 |
2 | b | 2 |
2 | c | 1 |
2 | a | 3 |
2 | c | 1 |
2 | a | 1 |
2 | c | 1 |
Necesito crear un gráfico de barras apiladas para mostrar el porcentaje de defecto por categoría a,b,c por cada proyecto. Usé Dax y me da en el gráfico de barras apiladas 100% todo el tiempo. No puedo permitir que considere el denimador como el número total de instancias por proyecto 1 o 2.
Lo hice en excel para la simplificación. Usé pivote para contar #defects por cantidad por cada tipo de defecto y dividido sobre la suma total de
a | 7 |
b | 3 |
c | 1 |
a | 5 |
b | 4 |
c | 3 |
esto es lo que quiero graficar (puedo usar la barra apilada en pbi)
proyecto 1 | proyecto 2 | |
a | 64% | 42% |
b | 27% | 33% |
c | 9% | 25% |
Agradezco la ayuda
Solved! Go to Solution.
@Fair-UL aquí está la medida
% = DIVIDE ( SUM ( 'Table'[qty] ), CALCULATE ( SUM ( 'Table'[qty] ), ALLEXCEPT ( 'Table', 'Table'[project#] ) ) )
aquí está la salida
aquí es cómo lo haces
Me 💖 Kudos 🙂 si mi solución me ayudara. Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Trate como
divide(sum(Table[Qty]),calculate(sum(Table[Qty]),allexcept(Table[defect type])))
Usé este mismo dax antes, pero con Count y ALL, no era correcto
ahora utilicé el suyo, pero cambié el ALLEXCEPT a ALL y me dio el gráfico que necesito. Muchas gracias @amitchandak
@Fair-UL aquí está la medida
% = DIVIDE ( SUM ( 'Table'[qty] ), CALCULATE ( SUM ( 'Table'[qty] ), ALLEXCEPT ( 'Table', 'Table'[project#] ) ) )
aquí está la salida
aquí es cómo lo haces
Me 💖 Kudos 🙂 si mi solución me ayudara. Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Gracias @parry2k utilicé el mismo DAX con ALL no ALLEXCEPT, ya que tenía varios desgloses de capas en el gráfico de barras apiladas y usé todas esas columnas para desfiltrar el denominador. Gracias de nuevo, los gráficos son geniales!
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 |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |