Hi everyone,
I need to do diverse calculation with a column which contain boolean value, but PowerBI isn't understanding boolean as integer.
I want to add a new column in my dimension, with the integer of this boolean value but my expression is always returning 0 even for un true boolean :
lookup1.Column1.equals("1")?1:0
(Column1 is a boolean)
Does anyone know where is my mistake, or how can I do it ?
Thank's in advance,
Julien
It's a Java ternary operator and is equivalent to: -
if(lookup1.Column1) 1; else 0;
but you can't easily use an if statement in a mapping expression.
If you mean, why does you way not work, take a look at the Java help for Boolean.equal()