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.
Hola a todos
Tengo los siguientes datos de ejemplo que estoy intentando usar para crear una nueva columna que marque cuándo un inquilino permanece o se va.
Esperado Columna es lo que estoy persiguiendo:
EntradaNo | Fecha | PropiedadN Inclusive | EdificioN inclusivo | Título | TenantN Incluido | Quebrar | Que Da | Bef | Rec | Después | TES_Title_First Entrada | Después2 | Correcto | Esperado |
173 | 29/04/2021 12:34 | Propiedad A | Edificio A | Unidad C | Cliente1 | 31/12/2019 00:00 | 0 | 0 | 1 | 1 | 1 | |||
173 | 29/04/2021 13:30 | Propiedad A | Edificio A | Unidad C | Cliente1 | 31/12/2021 00:00 | 0 | 0 | 0 | 0 | 0 | Permanecía | ||
173 | 30/04/2021 14:42 | Propiedad A | Edificio A | Unidad C | Cliente1 | 31/12/2021 00:00 | 0 | 0 | 0 | 0 | 0 | |||
173 | 09/05/2021 16:45 | Propiedad A | Edificio A | Unidad C | Cliente1 | 12/04/2021 00:00 | 31/12/2021 00:00 | 0 | 0 | 0 | 0 | 0 | ||
173 | 09/05/2021 17:45 | Propiedad A | Edificio A | Unidad C | Cliente1 | 02/05/2021 00:00 | 31/12/2021 00:00 | 0 | 0 | 0 | 0 | 0 | ||
173 | 21/05/2021 13:44 | Propiedad A | Edificio A | Unidad C | Cliente1 | 02/05/2021 00:00 | 31/12/2021 00:00 | 1 | 0 | 0 | 0 | 0 | ||
173 | 21/05/2021 13:44 | Propiedad A | Edificio A | Unidad C | Cliente1 | 31/12/2021 00:00 | 0 | 1 | 0 | 0 | 0 | Permanecía | Permanecía | |
173 | 21/05/2021 15:12 | Propiedad A | Edificio A | Unidad C | Vacante | 31/12/2021 00:00 | 0 | 0 | 1 | 0 | 0 | Izquierda | Izquierda | |
173 | 22/05/2021 11:41 | Propiedad A | Edificio A | Unidad C | Vacante | 31/12/2021 00:00 | 0 | 0 | 0 | 0 | 0 | |||
173 | 23/05/2021 19:43 | Propiedad A | Edificio A | Unidad C | Vacante | 31/12/2021 00:00 | 0 | 0 | 0 | 0 | 0 | |||
173 | 23/05/2021 19:43 | Propiedad A | Edificio A | Unidad C | Vacante | 31/12/2021 00:00 | 0 | 0 | 0 | 0 | 0 | |||
173 | 23/05/2021 19:43 | Propiedad A | Edificio A | Unidad C | Vacante | 31/12/2021 00:00 | 0 | 0 | 0 | 0 | 0 | |||
173 | 24/05/2021 00:56 | Propiedad A | Edificio A | Unidad C | Vacante | 15/09/2021 00:00 | 31/12/2021 00:00 | 0 | 0 | 0 | 0 | 0 | ||
173 | 24/05/2021 01:21 | Propiedad A | Edificio A | Unidad C | Vacante | 30/09/2021 00:00 | 31/12/2021 00:00 | 0 | 0 | 0 | 0 | 0 | ||
173 | 24/05/2021 01:26 | Propiedad A | Edificio A | Unidad C | Vacante | 31/01/2022 00:00 | 0 | 0 | 0 | 0 | 0 | |||
173 | 24/05/2021 01:38 | Propiedad A | Edificio A | Unidad C | Vacante | 06/02/2022 00:00 | 1 | 0 | 0 | 0 | 0 | |||
173 | 24/05/2021 01:38 | Propiedad A | Edificio A | Unidad C | Vacante | 06/02/2022 00:00 | 0 | 1 | 0 | 0 | 0 | |||
173 | 24/05/2021 01:40 | Propiedad A | Edificio A | Unidad C | Cliente3 | 06/02/2022 00:00 | 0 | 0 | 1 | 0 | 1 | |||
173 | 23/08/2021 09:53 | Propiedad A | Edificio A | Unidad C | Cliente3 | 06/02/2022 00:00 | 0 | 0 | 0 | 0 | 0 | |||
173 | 23/08/2021 09:57 | Propiedad A | Edificio A | Unidad C | Cliente3 | 06/02/2022 00:00 | 1 | 0 | 0 | 0 | 0 | |||
173 | 23/08/2021 09:57 | Propiedad A | Edificio A | Unidad C | Cliente3 | 06/02/2022 00:00 | 0 | 1 | 0 | 0 | 0 | Permanecía |
Lógica:
Usando el siguiente código y después de crear varias columnas "Antes / Reciente / Después" pude crear la columna "RET" pero aún no está bien, ¿puede ayudar?
Ret =
VAR TenantB = CALCULATE(VALUES('Table'[TenantN Inclusive]), 'Table'[bef] = 1)
VAR TenantC = CALCULATE(VALUES('Table'[TenantN Inclusive]), 'Table'[rec] = 1)
VAR BreakPRe = CALCULATE(VALUES('Table'[Break]), 'Table'[bef] = 1)
VAR BreakCurr = CALCULATE(VALUES('Table'[Break]), 'Table'[rec] = 1)
VAR TenantAA = CALCULATE(VALUES('Table'[TenantN Inclusive]), 'Table'[After] = 1)
VAR IFs = IF(
'Table'[TenantN Inclusive] = "Vacant - LCR"
|| 'Table'[bef] = 0 && 'Table'[rec] = 0
|| 'Table'[bef] = 1,
BLANK(),
IF(
OR(BreakPRe < BreakCurr || TenantB = TenantC,
BreakCurr = BLANK() && BreakPRe <> BLANK()
),
"False",
"True"))
VAR GUR = SWITCH(
TRUE(),
IFs = "True", "Remained",
'Table'[After] = 0, BLANK(),
'Table'[TES_Title_First Entry] = 1, BLANK(),
TenantC <> TenantAA || TenantC = "Vacant", "Left",
"Left")
VAR IFY = IF('Table'[After2] = 1, BLANK(), GUR)
Return
IFY
Estoy tan cerca...
Gracias
H
Hay @Calvin69
Cuáles son los valores de los campos 'Tabla'[TES_Title_First Entrada] y 'Tabla'[Después2] , En los datos que proporcionaste, no encontré estos dos campos. ¿Puede proporcionar los valores de estos dos campos?
Saludos
Equipo de apoyo a la comunidad _ Ailsa Tao
Gracias @Ailsa-msft por investigar esto y disculpas por la respuesta tan tardía.
He modificado los datos de la tabla para incluir las columnas que faltan.
Gracias de antemano.
H
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 |