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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

SWITCH con SUMX mide que los valores no aparecen correctamente

Hola a todos. Publicar aquí es mi último recurso 😭
Por lo tanto, tengo una matriz visual que me gustaría mostrar. Estoy usando medidas SWITCH() para mostrar valores en la matriz, especialmente porque algunos de los valores provienen de columnas calculadas y otras de medidas.

Valores ?
VAR ASR Á CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Garantía")) + CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'), ISBLANK('FY21 Rev'[Group]))/2)
VAR CONS á CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Consulting"))
TRANSACCIONES DE VAR : CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Ofertas"))
VAR TAX ? CALCULATE(SUM('FY21 Rev'[FY21 Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Tax")) + CALCULATE(SUM('FY21 Rev'[FY21 Rev]), FILTER(ALLSELECTED('FY21 Rev'), ISBLANK('FY21 Rev'[Group]))/2
VAR IFS á CALCULATE(SUM('FY21 Rev'[FY21 Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Group]-"IFS"))

devolución
SWITCH(
SELECTEDVALUE('Grupo dim'[Grupo LoS]),
"Assurance", ASR,
"Consultoría", CONS,
"Ofertas", DEALS,
"Impuesto", IMPUESTO,
"IFS", IFS)

Como se puede ver arriba, para VARs ASR y TAX en realidad tienen 2 partes a sus fórmulas. La primera parte es la misma que las otras VAR, pero también han encontrado ISBLANK([Group]) y /2 y suman estas 2 partes juntas.
Los valores de esta medida se muestran correctamente, pero no hay ningún valor de subtotal de fila. Vi en algún lugar que debería hacer una medida SUMX para mostrar la subtota, que es lo que hice a continuación.
Valores* á SUMX(VALUES('Group dim'[Group]), 'FY21 Rev'[Values])
Aquí es donde está el problema. El subtotal aparece correctamente PERO los valores para VARs ASR e TAX ahora muestran solo los valores de la primera parte de las fórmulas, dejando fuera el ISBLANK([Group]) y /2.
Screenshot 2020-12-01 170630.png
Cualquier entrada / ayuda es apreciado!
¡Gracias!
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hola @adrlljh ,

Actualice la fórmula de su medida [Valores] como se indica a continuación:

Valores ?
VAR ASR á CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Aseguramiento")) + CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'),
'FY21 Rev'[Grupo]""--- ISBLANK('FY21 Rev'[Grupo])))/2
VAR CONS á CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Consulting"))
TRANSACCIONES DE VAR : CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Ofertas"))
VAR TAX ? CALCULATE(SUM('FY21 Rev'[FY21 Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Tax")) + CALCULATE(SUM('FY21 Rev'[FY21 Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'" ISBLANK('FY21 Rev'[Grupo])))/2
VAR IFS á CALCULATE(SUM('FY21 Rev'[FY21 Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Group]-"IFS"))
devolución
SWITCH(
SELECTEDVALUE('Grupo dim'[Grupo LoS]),
"Assurance", ASR,
"Consultoría", CONS,
"Ofertas", DEALS,
"Impuesto", IMPUESTO,
"IFS", IFS)

SWITCH with SUMX measures values not showing up correctly.JPG

Saludos

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hola @adrlljh ,

Actualice la fórmula de su medida [Valores] como se indica a continuación:

Valores ?
VAR ASR á CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Aseguramiento")) + CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'),
'FY21 Rev'[Grupo]""--- ISBLANK('FY21 Rev'[Grupo])))/2
VAR CONS á CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Consulting"))
TRANSACCIONES DE VAR : CALCULATE(SUM('FY21 Rev'[Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Ofertas"))
VAR TAX ? CALCULATE(SUM('FY21 Rev'[FY21 Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Grupo]-"Tax")) + CALCULATE(SUM('FY21 Rev'[FY21 Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'" ISBLANK('FY21 Rev'[Grupo])))/2
VAR IFS á CALCULATE(SUM('FY21 Rev'[FY21 Rev]), FILTER(ALLSELECTED('FY21 Rev'), 'FY21 Rev'[Group]-"IFS"))
devolución
SWITCH(
SELECTEDVALUE('Grupo dim'[Grupo LoS]),
"Assurance", ASR,
"Consultoría", CONS,
"Ofertas", DEALS,
"Impuesto", IMPUESTO,
"IFS", IFS)

SWITCH with SUMX measures values not showing up correctly.JPG

Saludos

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.