Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
PBI_newuser
Post Prodigy
Post Prodigy

Mes/Año de Hoy ()

Hola

Hay un error para la siguiente columna, por favor avise si MES (TODAY()) y YEAR (TODAY()) no se pueden utilizar aquí.

Mensaje de error:

Las operaciones de comparación dax no admiten la comparación de valores de tipo Text con valores de tipo Integer.

Considere la posibilidad de utilizar la función VALUE o FORMAT para convertir uno de los valores.

Marcador: IF(Table[Due_Date]-BLANK(),1,
IF(OR(AND(Table[Due_Date].[ Mes]-MONTH(TODAY()),Tabla[Due_Date]. [Año]-Año(HOY())),
TODAY()<Table[Due_Date]),
0,1))

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@PBI_newuser , Probar como

Bandera: IF( isblank(Table[Due_Date]),1,
IF(OR(AND( month(Table[Due_Date])-MONTH(TODAY()),year(Table[Due_Date])-YEAR(TODAY())),
TODAY()<Table[Due_Date]),
0,1))

La esperanza due_date se identifica como fecha

View solution in original post

sktneer
Resolver I
Resolver I

Tabla[Due_Date]. [Mes] devolverá Month Name y MONTH(TODAY()) devolverá el número de mes y no se pueden comparar.

Por lo tanto, realice una comparación entre MONTH(Table[Due_Date]) y MONTH(TODAY()) porque ambos devolverían Numbers.

View solution in original post

2 REPLIES 2
sktneer
Resolver I
Resolver I

Tabla[Due_Date]. [Mes] devolverá Month Name y MONTH(TODAY()) devolverá el número de mes y no se pueden comparar.

Por lo tanto, realice una comparación entre MONTH(Table[Due_Date]) y MONTH(TODAY()) porque ambos devolverían Numbers.

amitchandak
Super User
Super User

@PBI_newuser , Probar como

Bandera: IF( isblank(Table[Due_Date]),1,
IF(OR(AND( month(Table[Due_Date])-MONTH(TODAY()),year(Table[Due_Date])-YEAR(TODAY())),
TODAY()<Table[Due_Date]),
0,1))

La esperanza due_date se identifica como fecha

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.