The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Helo Community,
I am trying to write down formula using DAX COALESCE function and I am getting below error.
“Expressions that yield variant data-type cannot be used to define calculated columns.”
How do I write below formula?
Coalsec =
var Good='A&I'[% Price Up or Down]>0.010000 && 'A&I'[Active / Inactive] = "Active"
var Poor='A&I'[% Price Up or Down]>=0.000000 && 'A&I'[% Price Up or Down]<=0.009999 && 'A&I'[Active / Inactive] = "Active"
var result=
COALESCE(Good,Poor,"No Impact")
return
result
Thanks
The SQL Coalesce and IsNull functions are used to handle NULL values. During the expression evaluation process the NULL values are replaced with the user-defined value.
The SQL Coalesce function evaluates the arguments in order and always returns first non-null value from the defined argument list.
Syntax
COALESCE ( expression [ 1…n ] )
Thank you so much Amit. I am using March vesion and I am getting below error.