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
Hi, I'm trying to calculate the difference beetwen the sum of two columns from two tables based on a date in a new table
The variable suma_hoy is working perfectly, but the variable sum_pasada is gives me the follow error:
"DAX comparison operations do not support comparing values of type Date with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values."
I've checked the type of my column Seguimiento_fecha, and it seems to be correct:
Why am I getting that error? How should calculate that difference properly?
Solved! Go to Solution.
Hi Pumpikin,
In line 2 for the variable days_before, NOW() returns a date and time. Try using TODAY() that returns date only.
The function FORMAT turns the value into a Text, so it cant be compared with a data.
try this for your days_before:
VAR days_before = TODAY() - 7
Hi Tutu, thanks for your help, but still not working.
The filter is no working properly, I think is because now() is retrieving as dd/mm/yyyy HH:mm:ss and the column in my table is dd/mm/yyyy so they are not matching.
Try replace now() with today()
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 8 | |
| 8 | |
| 8 | |
| 8 |