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 comunidad,
puede onyone ayudarme a calcular el número de días hasta que un valor se duplique? No conseguimos encontrar tu ubicación exacta. ¿Alguien tiene algo a mano?
Solved! Go to Solution.
Hola, @raymond
Basándome en mi investigación, puede crear una medida como se muestra a continuación.
CountDays =
var _maxdate =
CALCULATE(
MAX('Table'[Date]),
ALLSELECTED('Table')
)
var _maxvalue =
LOOKUPVALUE(
'Table'[Value],
'Table'[Date],
_maxdate
)
var _halfvaluedate =
LOOKUPVALUE(
'Table'[Date],
'Table'[Value],
CALCULATE(
MAX('Table'[Value]),
FILTER(
ALLSELECTED('Table'),
'Table'[Value]<=_maxvalue/2
)
)
)
return
DATEDIFF(
_halfvaluedate,
_maxdate,
DAY
)+1
Resultado:
Saludos
Allan
Si este post ayuda,entonces por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Hola, @raymond
Basándome en mi investigación, puede crear una medida como se muestra a continuación.
CountDays =
var _maxdate =
CALCULATE(
MAX('Table'[Date]),
ALLSELECTED('Table')
)
var _maxvalue =
LOOKUPVALUE(
'Table'[Value],
'Table'[Date],
_maxdate
)
var _halfvaluedate =
LOOKUPVALUE(
'Table'[Date],
'Table'[Value],
CALCULATE(
MAX('Table'[Value]),
FILTER(
ALLSELECTED('Table'),
'Table'[Value]<=_maxvalue/2
)
)
)
return
DATEDIFF(
_halfvaluedate,
_maxdate,
DAY
)+1
Resultado:
Saludos
Allan
Si este post ayuda,entonces por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
La información que ha proporcionado no me está aclarando el problema. Por favor, explíquelo con un ejemplo.
Aprecia tus Felicitaciones.
Debería funcionar un poco así. Dependiendo de la selección de fecha que se realice, la medida debe calcular el número de días que se encuentran entre el valor más grande (aquí acumulado) y la mitad del valor.
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 |