Forum Discussion
Dicken
Post Prodigy
19 hours agofunction logical error
Hi, i kinda get why this error happens but thougt someone might have thoughts insights into the error problem; i i start with a true false ; = let test =( x)=> Number.Round(x) = x i...
tayloramy
Super User
19 hours agoHi Dicken,
In Power query, functions themselves can't be used as a boolean value. Test is a function, not a boolean itself, so you need to call the function with a value for it to return something useful.
let
test = (x) => Number.Round(x) = x,
result = if test(5) then "whole" else "decimal"
in
result