Forum Discussion
Anonymous
6 years agoNot applicable
DAX, nested if function with not supporting dates and text comparison error
hello there, I'm trying to add a new column with nested if functions but im getting this error : DAX comparison operations do not support comparing values of type Date with values of type Text. Co...
- Anonymous6 years ago
Hello,
I'm thinking that this part of your switch is where the error could be:
IF(InvestigationCompteur[MT20DateRV]="",TRUNC(NOW()-InvestigationCompteur[DateIntitiation],0),
If InvestigationCompteur[MT20DateRV] is a DATE value, you're trying to see if it is equal to "", which is a string value. If you're trying to say, "if [MT20DateRV] is null do this", try setting it = to BLANK() like below:IF(InvestigationCompteur[MT20DateRV] = BLANK(),TRUNC(NOW()-InvestigationCompteur[DateIntitiation],0),
Anonymous
6 years agoNot applicable
Hello,
I'm thinking that this part of your switch is where the error could be:
IF(
InvestigationCompteur[MT20DateRV]="",
TRUNC(
NOW()-InvestigationCompteur[DateIntitiation],0),
If InvestigationCompteur[MT20DateRV] is a DATE value, you're trying to see if it is equal to "", which is a string value. If you're trying to say, "if [MT20DateRV] is null do this", try setting it = to BLANK() like below:
If InvestigationCompteur[MT20DateRV] is a DATE value, you're trying to see if it is equal to "", which is a string value. If you're trying to say, "if [MT20DateRV] is null do this", try setting it = to BLANK() like below:
IF(
InvestigationCompteur[MT20DateRV] = BLANK(),
TRUNC(
NOW()-InvestigationCompteur[DateIntitiation],0),