Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

True/False with Text in a DAX if statement

Hi,

 

I have a DAX formula below that I'm trying to calculate Disputes if the Charger is false and the Status is "Approved" 

 

Approved Charge = If( FullError[Charge]=FALSE() & FullErrorl[Status]="Approvedl", FullError[Disputes],0)
 
When I try this I'm getting a error Can't type True/False with Text. 
 
Any help ? 

1 Reply

  • JarroVGIT's avatar
    JarroVGIT
    Icon for Resident Rockstar rankResident Rockstar

    Well couple of things actually. Combining two expressions to be evaluated by an IF() function require '&&' operator, not just '&'. 

    Your error indicates that your FullError[Charge] column is not of a boolean type. Can you confirm the data type of this column? (and of the other columns, just in case this is not that?)? Is this a calculated column or a measure? 

     

    A screenshot of your Query Editor screen / data model would help a lot.

     

    Kind regards

    Djerro123

    -------------------------------

    If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

    Keep those thumbs up coming! 🙂