This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello all,
I am trying to create a flag of 1 or 0 based on the timing of 2 date columns in my table, but I am getting the error message "DAX comparison does not support comparing values of type Date with values of type Text". Both of my date variables are stored in power BI as type Date, so I'm unsure where my error is?
Here is my formula:
Solved! Go to Solution.
hi @colettb
The error happens because a single ampersand (&) is used for joining text strings (concatenation). Power BI is trying to concatenate a string with a date comparison, causing a type conflict.
To fix this, you need to make two changes:
Flag =
IF(
NOT(ISBLANK('Metrics'[Date1])) && 'Metrics'[Date2] < (TODAY() - 60),
1,
0
)
Thank you @Cookistador! That worked, I was totally looking at the wrong part of the formula.
hi @colettb
The error happens because a single ampersand (&) is used for joining text strings (concatenation). Power BI is trying to concatenate a string with a date comparison, causing a type conflict.
To fix this, you need to make two changes:
Flag =
IF(
NOT(ISBLANK('Metrics'[Date1])) && 'Metrics'[Date2] < (TODAY() - 60),
1,
0
)
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 33 | |
| 26 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 44 | |
| 28 | |
| 24 | |
| 22 |