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
Anonymous
Not applicable

DAX Formula Issue-No admite la comparación del valor del tipo De fecha con el Tipo de texto

Hola, chicos

Estoy tratando de crear el DAX fromula a continuación:

If(Begin-Date)>"7/01/2019", "Yes", "No")

Pero me da el siguiente error: No admite la comparación del tipo de valor de Fecha con el tipo de valor de Texto.

¿Cómo puedo evitar ese problema?

Gracias

Final

3 ACCEPTED SOLUTIONS
FarhanAhmed
Community Champion
Community Champion

If( (Begin-Date) >Date(2019,07,01), "Yes", "No")







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




View solution in original post

amitchandak
Super User
Super User

@sonamyan , como una nueva columna

If([Begin-Date]> date(2019,01,7), "Yes", "No")

Nueva medida

If(max(Table[Begin-Date])> date(2019,01,7), "Yes", "No")

En el caso de la medida, encárgate del contexto de fila. refer : https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...

View solution in original post

v-eachen-msft
Community Support
Community Support

Hola @sonamyan ,

No puede comparar los diferentes tipos de valor. Puede usar FORMAT(Begin-Date,"mm/dd/aaaa") para obtener valores de texto o usar DATE(2019,07,01) para obtener valores de fecha.

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

3 REPLIES 3
v-eachen-msft
Community Support
Community Support

Hola @sonamyan ,

No puede comparar los diferentes tipos de valor. Puede usar FORMAT(Begin-Date,"mm/dd/aaaa") para obtener valores de texto o usar DATE(2019,07,01) para obtener valores de fecha.

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
amitchandak
Super User
Super User

@sonamyan , como una nueva columna

If([Begin-Date]> date(2019,01,7), "Yes", "No")

Nueva medida

If(max(Table[Begin-Date])> date(2019,01,7), "Yes", "No")

En el caso de la medida, encárgate del contexto de fila. refer : https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...

FarhanAhmed
Community Champion
Community Champion

If( (Begin-Date) >Date(2019,07,01), "Yes", "No")







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




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.