Forum Discussion
IF statement in CC, getting error "Expressions that yield variant data-type cannot be used to define
- 4 years ago
Typically, you get this sort of error when your if returns text for one result and a number for the other. This situation doesn't look like it has text output though.
What are the data types for the [Total Rebates Paid] column and [_CAD]?
- 4 years ago
Hi JeanMariePBI
Based on the error message, it is caused by the different data types in column.
Check the 'Rebates Paid'[Currency] and 'Rebates Paid'[Total Rebates Paid] data types.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/New Year Power BI eCard:
https://community.powerbi.com/t5/Data-Stories-Gallery/Happy-New-Year/td-p/2266398
- 4 years ago
Hello Alexis, the data type for Total Rebates Paid and CAD are both numeric which is why I don't understand the error message.
Hi JeanMariePBI
Based on the error message, it is caused by the different data types in column.
Check the 'Rebates Paid'[Currency] and 'Rebates Paid'[Total Rebates Paid] data types.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
New Year Power BI eCard:
https://community.powerbi.com/t5/Data-Stories-Gallery/Happy-New-Year/td-p/2266398
- JeanMariePBI4 years ago
Helper I
Thank you! This worked. One of the columns had a AlphaNumeric data type. Once I switched it over to Numeric the issue resolved. Happy New Year!