Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hola
Tengo una fórmula creada usando DAX en mi tabla, pero algo no está bien con el resultado final y no sé por qué.
Tengo esta columna que proviene de un archivo de Excel, información dentro fue introducida con una aplicación PowerApps. Pero la segunda columna fue añadida en PowerBi
Esta es básicamente la fórmula que estoy usando
Columna de la base de fechas
Columna calculada
He probado con algunos de mis archivos.
Con mi experiencia, intente comprobar si hay espacios después del texto, por ejemplo, "Pend", me he reunido con eso un par de veces.
Paul Zheng
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 @CP0822,
Usted tiene la partedencia de la cláusula if en el lugar incorrecto, está cerrando la cláusula IF antes de la - 2.
Prueba esto
Consump_time =
IF (
Table1[Consumption_pre_status] = "Pend",
BLANK (),
( Table1[Latest Consump date] - Table1[Contract_date] )
- 2
* (
ROUNDDOWN (
( Table1[Latest Consump date].[Date] - Table1[Contract_date] ) / 7,
0
)
)
)
Como puede ver en la imagen debajo de este nuevo cálculo devuelve el resultado esperado.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThis is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.