Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hey guys,
I am trying to create the DAX fromula below:
If(Begin-Date)>"7/01/2019", "Yes", "No")
But it gives me the following error: Does not support comparing the value type of Date with value type of Text.
How can I avoide that issue?
Thanks,
Sona
Solved! Go to Solution.
If( (Begin-Date) >Date(2019,07,01), "Yes", "No")
Proud to be a Super User!
@Anonymous , as a new column
If([Begin-Date]> date(2019,01,7), "Yes", "No")
New measure
If(max(Table[Begin-Date])> date(2019,01,7), "Yes", "No")
In the case of the measure take care of row context. refer : https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Difference-Across/ba-p/934397#M451
Hi @Anonymous ,
You cannot compare the different value types. You could use FORMAT(Begin-Date,"mm/dd/yyyy") to get text values or use DATE(2019,07,01) to get date values.
Hi @Anonymous ,
You cannot compare the different value types. You could use FORMAT(Begin-Date,"mm/dd/yyyy") to get text values or use DATE(2019,07,01) to get date values.
@Anonymous , as a new column
If([Begin-Date]> date(2019,01,7), "Yes", "No")
New measure
If(max(Table[Begin-Date])> date(2019,01,7), "Yes", "No")
In the case of the measure take care of row context. refer : https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Difference-Across/ba-p/934397#M451
If( (Begin-Date) >Date(2019,07,01), "Yes", "No")
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 48 | |
| 46 |