Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
daidominguez
Frequent Visitor

Suma: respuestas y agrupación por categoría

¡Hola a todos!

Estoy tratando de sumar el número de respuestas obtenidas de una encuesta y organizarlas en 3 categorías.
En este caso, tengo mis 2 columnas principales:

- Columna "Respuesta": con 5 valores (Altamente de acuerdo; De acuerdo; Neutral; No estar de acuerdo; y altamente en desacuerdo).
- Columna "#Responses": con el número de respuestas por categoría.


Lo que necesito hacer es:
- Sumar el número de respuestas por categoría pero agruparlas (utilizando diferentes columnas o medidas) de la siguiente manera:
* Positivo:para respuestas altamente de acuerdo y de acuerdo
* Neutral: para respuestas neutrales
* Negativo:para las respuestas en desacuerdo y altamente en desacuerdo.

daidominguez_1-1593632592300.png


¿Cuál es la mejor y fácil manera de hacerlo? Le agradecería sus sugerencias.

Gracias de antemano por su ayuda!

1 REPLY 1
v-lionel-msft
Community Support
Community Support

Hola @daidominguez ,

Por favor, cree una columna calculada como esta.

Sum the number of responses by Category = 
CALCULATE(
    SUM(Sheet1[#Responses]),
    ALLEXCEPT( Sheet1, Sheet1[Answer] )
) 
grouping them together = 
SWITCH(
    [Answer],
    "Highly Agree", "Positive",
    "Agree", "Positive",
    "Neutral responses", "Neutral",
    "Disagree", "Negative",
    "Highly Disagree", "Negative"
)

O medir así.

Sum the number of responses by Category = 
CALCULATE(
    SUM(Sheet1[#Responses]),
    ALLEXCEPT( Sheet1, Sheet1[Answer] )
) 
grouping them together = 
SWITCH(
    MAX([Answer]),
    "Highly Agree", "Positive",
    "Agree", "Positive",
    "Neutral responses", "Neutral",
    "Disagree", "Negative",
    "Highly Disagree", "Negative"
)

Saludos
Lionel Chen

Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.