Un usuario Pregunto ✅
hkbida
Buenos días,
Mi primera medida, «número de clientes», calcula distintos clientes cada mes.
Mi segunda medida, «nuevos clientes», determina el número de nuevos clientes.
y mi tercera medida «diferencia» es (número de clientes – nuevos clientes), calcula la diferencia entre el número de clientes y los nuevos clientes cada mes, quiero sumar mi columna «diferencia» pero obtuve 0.
v-juanli-msft
Hola @hkbida
Crear medidas
no.customer =
IF (
HASONEVALUE ( Sheet3[month year] ),
CALCULATE (
DISTINCTCOUNT ( Sheet3[id] ),
ALLEXCEPT ( Sheet3, Sheet3[month year] )
),
SUMX (
ALL ( Sheet3[month year] ),
CALCULATE (
DISTINCTCOUNT ( Sheet3[id] ),
ALLEXCEPT ( Sheet3, Sheet3[month year] )
)
)
)
count_eachid = CALCULATE(COUNT(Sheet3[id]),FILTER(ALLEXCEPT(Sheet3,Sheet3[id]),Sheet3[date]<=MAX(Sheet3[date])))
new customer = CALCULATE(DISTINCTCOUNT(Sheet3[id]),FILTER(ALLEXCEPT(Sheet3,Sheet3[month year]),Sheet3[count_eachid]=1))
difference = [no.customer]-[new customer]
Atentamente
Maggie
Maggie
Equipo de apoyo de la comunidad _ Maggie Li
Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los demás miembros a encontrarla más rápidamente.
Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los demás miembros a encontrarla más rápidamente.
v-juanli-msft
Hola @hkbida
Crear medidas
no.customer =
IF (
HASONEVALUE ( Sheet3[month year] ),
CALCULATE (
DISTINCTCOUNT ( Sheet3[id] ),
ALLEXCEPT ( Sheet3, Sheet3[month year] )
),
SUMX (
ALL ( Sheet3[month year] ),
CALCULATE (
DISTINCTCOUNT ( Sheet3[id] ),
ALLEXCEPT ( Sheet3, Sheet3[month year] )
)
)
)
count_eachid = CALCULATE(COUNT(Sheet3[id]),FILTER(ALLEXCEPT(Sheet3,Sheet3[id]),Sheet3[date]<=MAX(Sheet3[date])))
new customer = CALCULATE(DISTINCTCOUNT(Sheet3[id]),FILTER(ALLEXCEPT(Sheet3,Sheet3[month year]),Sheet3[count_eachid]=1))
difference = [no.customer]-[new customer]
Atentamente
Maggie
Maggie
Equipo de apoyo de la comunidad _ Maggie Li
Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los demás miembros a encontrarla más rápidamente.
Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los demás miembros a encontrarla más rápidamente.
Asac_14
En lugar de medir, ¿es posible utilizar la columna calculada en su tabla? Si es columna, el total de la diferencia vendrá correctamente.
hkbida
En respuesta a Asac_14
Lo he intentado, pero no funciona