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.
Estoy tratando de calcular la primera vez que el evento expiró en función del índice más antiguo.
--Evento-- | --Index-- | --Status-- | --Primera ocurrencia caducada-- |
Evento1 | 1 | válido | |
Evento1 | 2 | válido | |
Evento1 | 3 | caducado | Primero |
Evento1 | 4 | caducado | |
Evento1 | 5 | caducado | |
Evento1 | 6 | caducado | |
Evento1 | 7 | caducado | |
Evento2 | 1 | caducado | Primero |
Evento2 | 2 | caducado | |
Evento3 | 1 | válido | |
Evento3 | 2 | caducado | Primero |
Evento3 | 3 | caducado | |
Evento3 | 4 | caducado |
Ya casi llego, pero no sé a dónde llevarlo desde aquí:
First Occurrence Expired = CALCULATE(MAX(datasource[Index]),
FILTER(datasource,datasource[Event] = EARLIEST(datasource[Event]) &&
'datasource'[Index] = EARLIEST('datasource'[Index]) &&
datasource[Status] = "Expired"))
Esto me da el índice correcto.
Solved! Go to Solution.
No @WorkHard,
si te entendí entonces esta puede ser la solución:
First Occurance Expired =
VAR _MinIndex = CALCULATE(MIN('Table'[Index]), FILTER(ALLEXCEPT('Table','Table'[Event]),'Table'[Status] = "Expired"))
RETURN
IF(MIN('Table'[Index]) = _MinIndex , "First" , "")
Con amables saludos desde la ciudad donde la leyenda del 'Pied Piper de Hamelin' está en casa
FrankAT (Orgulloso de ser un Datanaut)
No @WorkHard,
si te entendí entonces esta puede ser la solución:
First Occurance Expired =
VAR _MinIndex = CALCULATE(MIN('Table'[Index]), FILTER(ALLEXCEPT('Table','Table'[Event]),'Table'[Status] = "Expired"))
RETURN
IF(MIN('Table'[Index]) = _MinIndex , "First" , "")
Con amables saludos desde la ciudad donde la leyenda del 'Pied Piper de Hamelin' está en casa
FrankAT (Orgulloso de ser un Datanaut)
súper confundido.
El regreso de
MIN('Table'[Index])
(última línea en su código) siempre está devolviendo 1 para mí.
Se corrigió quitando MIN del cálculo. Es posible que estuvieras creando una medida y estoy usando una columna de cálculo.
First Occurance Expired =
VAR _MinIndex = CALCULATE(MIN('Table'[Index]), FILTER(ALLEXCEPT('Table','Table'[Event]),'Table'[Status] = "Expired"))
RETURN
IF('Table'[Index] = _MinIndex , "First" , "")
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 | |
2 | |
2 | |
2 | |
1 |